Skip to content

Fix vehicle shadows remaining visible at zero alpha - #5323

Open
Dryxio wants to merge 3 commits into
multitheftauto:masterfrom
Dryxio:fix-vehicle-shadow-alpha
Open

Fix vehicle shadows remaining visible at zero alpha#5323
Dryxio wants to merge 3 commits into
multitheftauto:masterfrom
Dryxio:fix-vehicle-shadow-alpha

Conversation

@Dryxio

@Dryxio Dryxio commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix vehicle shadows remaining visible when the vehicle's alpha is 0.

Before/After

mta-screen_2026-09-05_10-34-41 mta-screen_2026-09-05_10-41-09

Motivation

An invisible vehicle could still be located by its shadow when using:
setElementAlpha(vehicle, 0)

The shadow should disappear together with the vehicle and return when its alpha is restored.
Follow-up to #5270.

Test plan

setElementAlpha(vehicle, 0) on a occupied/unoccupied vehicle.

Checklist

  • Your code should follow the coding guidelines.
  • Smaller pull requests are easier to review. If your pull request is beefy, your pull request should be reviewable commit-by-commit.

@FileEX FileEX added the bugfix Solution to a bug of any kind label Sep 5, 2026
Comment thread Client/game_sa/CSettingsSA.cpp
Comment thread Client/game_sa/CSettingsSA.cpp Outdated
@FileEX

FileEX commented Sep 5, 2026

Copy link
Copy Markdown
Member

Have you tested it after the latest commit?

@Dryxio

Dryxio commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

Have you tested it after the latest commit?

Yes

image

Something I didn't notice though is in night time for example it seems that it draws shadow when you drive under lights sources (lamppost etc), my pr doesn't cover this yet. Will check now, it's likely CShadows::RenderExtraPlayerShadows

image

@Dryxio

Dryxio commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

last commit fixes the extra shadows under light sources

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Solution to a bug of any kind

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants