MantisBT - Zandronum
View Issue Details
0000673Zandronum[All Projects] Bugpublic2012-02-14 18:172018-09-30 19:55
cq75 
Torr Samaho 
normalmajoralways
closedfixed 
LinuxUbuntu10.04 x86
98d 
1.0 
0000673: Damaging floors created in TERRAIN don't kill the player
If you make a damaging sector in TERRAIN (the demon face texture in the example wad) it will damage the player down to 0 health, but the player will continue to walk around with no weapons and 0 health.

The player can continue to stand in the damaging sector indefinitely. If something other than the damaging sector hurts the player, the player dies sometimes, but not every time.

By contrast, the flashing lava sector (damages using a sector special) works as expected.

This bug only happens online. It occurs both in 98D and r3299

Also, the TERRAIN damage rate for the damaging floor is not the same as it is offline.
Start a server with the example wad

Stand on the demon face sector

You will go down to 0 health, and not die.
No tags attached.
? terrain_damagebugtest_MAP01.wad (8,754) 2012-02-14 18:17
/tracker/file_download.php?file_id=459&type=bug
Issue History
2012-02-14 18:17cq75New Issue
2012-02-14 18:17cq75File Added: terrain_damagebugtest_MAP01.wad
2012-02-14 18:20Edward-sanNote Added: 0002599
2012-02-14 18:22Edward-sanNote Edited: 0002599bug_revision_view_page.php?bugnote_id=2599#r1306
2012-02-14 19:34cq75Note Added: 0002600
2012-02-14 20:02cq75Note Added: 0002601
2012-02-14 20:02cq75Note Edited: 0002601bug_revision_view_page.php?bugnote_id=2601#r1308
2012-02-15 06:51DuskNote Added: 0002603
2012-02-15 06:52DuskNote Edited: 0002603bug_revision_view_page.php?bugnote_id=2603#r1310
2012-02-15 06:52DuskNote Edited: 0002603bug_revision_view_page.php?bugnote_id=2603#r1311
2012-02-15 06:53DuskNote Edited: 0002603bug_revision_view_page.php?bugnote_id=2603#r1312
2012-02-15 06:53DuskNote Edited: 0002603bug_revision_view_page.php?bugnote_id=2603#r1313
2012-02-15 06:53DuskNote Edited: 0002603bug_revision_view_page.php?bugnote_id=2603#r1314
2012-02-15 06:54DuskNote Edited: 0002603bug_revision_view_page.php?bugnote_id=2603#r1315
2012-02-15 20:38cq75Note Added: 0002607
2012-02-16 02:11Torr SamahoNote Added: 0002610
2012-02-16 02:11Torr SamahoNote Edited: 0002610bug_revision_view_page.php?bugnote_id=2610#r1319
2012-02-16 02:18DuskNote Added: 0002612
2012-02-16 02:19Torr SamahoNote Edited: 0002610bug_revision_view_page.php?bugnote_id=2610#r1320
2012-02-16 02:19Torr SamahoNote Edited: 0002610bug_revision_view_page.php?bugnote_id=2610#r1321
2012-02-16 02:20Torr SamahoNote Added: 0002613
2012-02-16 02:27DuskNote Added: 0002614
2012-02-16 02:42Torr SamahoNote Added: 0002615
2012-02-16 02:42Torr SamahoStatusnew => resolved
2012-02-16 02:42Torr SamahoFixed in Version => 1.0
2012-02-16 02:42Torr SamahoResolutionopen => fixed
2012-02-16 02:42Torr SamahoAssigned To => Torr Samaho
2012-06-09 13:22Torr SamahoCategoryGeneral => Bug
2018-09-30 19:55Blzut3Statusresolved => closed

Notes
(0002599)
Edward-san   
2012-02-14 18:20   
(edited on: 2012-02-14 18:22)
Can you reproduce this in ZDoom svn r1551 and in latest ZDoom svn, both in single player and in multiplayer mode?

(0002600)
cq75   
2012-02-14 19:34   
I'll try that and report back.
(0002601)
cq75   
2012-02-14 20:02   
in single player the bug is not present in either Skulltag or zDoom.

The bug does not happen in multiplayer zDoom.

(0002603)
Dusk   
2012-02-15 06:51   
(edited on: 2012-02-15 06:54)
I looked into this and it seems that the client applies TERRAIN damage on its own. If the client thinks the health drops to 0, the weapon will fall down albeit he won't actually die since he still really has health left.

I found the culprit at p_spec.cpp. It works on my end now:
'https://bitbucket.org/CrimsonDusk/notebola/changeset/4f085a8d3dad [^]'

(0002607)
cq75   
2012-02-15 20:38   
I see, thanks
(0002610)
Torr Samaho   
2012-02-16 02:11   
(edited on: 2012-02-16 02:19)
The fix looks good, you should check ( NETWORK_InClientMode() == false ) instead of ( NETWORK_GetState() != NETSTATE_CLIENT ) though. Otherwise you will get problems when playing demos.

(0002612)
Dusk   
2012-02-16 02:18   
Adjusted.
'https://bitbucket.org/CrimsonDusk/notebola/changeset/ab9827f8b9e8 [^]'
(0002613)
Torr Samaho   
2012-02-16 02:20   
Looks good.

BTW: With which nick would you like to be mentioned in "Skulltag Version History.txt" when I port the fix to Skulltag?
(0002614)
Dusk   
2012-02-16 02:27   
Just call me Dusk. Nightfall's an old nick I stopped using a long time ago. Crimson Dusk is longer version I use outside Skulltag.
(0002615)
Torr Samaho   
2012-02-16 02:42   
I added your fix to Skulltag. Note that I intentionally didn't port the extra tabs you added in the empty line above the comment and put extra brackets around the InClientMode check. Although the brackets are not necessary, I think it's easier to read with brackets. And in case you are wondering why I didn't put extra brackets around the existing ZDoom ironfeet check ;), I try to deviate from the ZDoom code only if absolutely necessary. Makes porting things easier.