FWGS / hlsdk-portable

Portable Half-Life SDK. GoldSource and Xash3D. Crossplatform.
https://xash.su
Other
260 stars 120 forks source link

Spray in singleplayer draws a wrong sprite after save-restore #239

Open FreeSlave opened 2 years ago

FreeSlave commented 2 years ago

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.

lewa-j commented 2 years ago

I assume this is consistent with steam half-life?

FreeSlave commented 2 years ago

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