Fix ped shadows remaining visible at zero alpha - #5270
Conversation
MTA applies ped alpha to the RenderWare clump while GTA uses separate visibility and real-time shadow state. This can leave blob and dynamic shadows visible after a ped becomes fully transparent. Keep native ped visibility synchronized with the effective clump alpha, return existing real-time shadow data immediately, and skip GTA's player-specific blob-shadow submission when the local player is fully transparent. Tested Game SA and Client Deathmatch Release|Win32. Tested in game on the local player at alpha 0 and 255 with both blob and dynamic ped shadows.
|
Should we fix issues like this? Isn't it adding unnecessary complexity? Interiors simply weren't implemented for such features. After all, the main interiorless thing is element collision. If someone wants to hide everything then he should use dimensions. |
For example, this is useful when admins are invisible. Other players can see the admin's location by the shadow. |
I don’t get it. If a player is intentionally made invisible, shouldn’t their shadow be invisible too? |
|
My bad, I thought this PR was about element interior, not opacity. However, IMO it would be best to also have an scripting function to control whether element casts shadows. |
|
What about vehicle shadows? |
I’ll open a separate PR for vehicle shadows if that’s fine |
Summary
Fix ped shadows remaining visible when the ped's effective alpha is
0.Before

After

Motivation
An invisible ped could still be located by its shadow when using:
The shadow should disappear together with the ped and return normally when its alpha is restored.
Test plan
Tested in game on the local player:
ped-shadow-alpha-player-test.zip
/pedshadow 0/pedshadow 255Also verified that restoring alpha to
255recreates the shadow normally.Checklist