hlsdk-portable icon indicating copy to clipboard operation
hlsdk-portable copied to clipboard

Spray in singleplayer draws a wrong sprite after save-restore

Open FreeSlave opened this issue 3 years ago • 2 comments

The bahavior is observed in original Half-Life too. To reproduce:

  1. Delete tempdecals.wad to ensure that you don't have a spray from multiplayer settings.
  2. Start the game and load some map via console.
  3. Use spray on the wall. The lambda from decals.wad will appear.
  4. Quick save and reload
  5. 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.

FreeSlave avatar Jan 15 '22 11:01 FreeSlave

I assume this is consistent with steam half-life?

lewa-j avatar Jan 15 '22 16:01 lewa-j

Yep, by original Half-Life I meant the current steam version.

FreeSlave avatar Jan 15 '22 17:01 FreeSlave