hlsdk-portable
hlsdk-portable copied to clipboard
Spray in singleplayer draws a wrong sprite after save-restore
The bahavior is observed in original Half-Life too. To reproduce:
- Delete
tempdecals.wadto ensure that you don't have a spray from multiplayer settings. - Start the game and load some map via console.
- Use spray on the wall. The lambda from
decals.wadwill appear. - Quick save and reload
- Use spray again. The yellow blood decal will be drawn instead.
The problem is that decal is set to -1 on spawn https://github.com/FWGS/hlsdk-xash3d/blob/master/dlls/client.cpp#L198 https://github.com/FWGS/hlsdk-xash3d/blob/master/dlls/player.cpp#L4418 but after save-restore m_nCustomSprayFrames is set to 0.
Not sure how we should fix it if fix at all. Creating the issue just to let people know about the problem.
I assume this is consistent with steam half-life?
Yep, by original Half-Life I meant the current steam version.