MantisBT - Zandronum
View Issue Details
0001634Zandronum[All Projects] Bugpublic2013-12-31 22:312018-09-30 21:58
AlexMax 
Edward-san 
normalminoralways
closedfixed 
1.4 
3.03.0 
0001634: Weird spawn telefragging behavior on Duel32 + Transfer Heights
Ever since releasing duel32e I have noticed that it is MUCH easier to telefrag someone by spawning in. It might have something to do with Transfer Heights, but I'm pretty sure DooM spawnfrags somebody as a last resort or at the end of an extremely unlucky set of RNG rolls.
1. Join a duel32e server and spawn into it. Don't move.
2. Have a second player join the server and spawn.
3. If you don't telefrag the other player, quit the server, rejoin, and respawn until you do.
Here's the WAD to reproduce.

'http://files.funcrusher.net/wads/duel32e.pk3 [^]'

Seeing as it's _very_ repeatable, it should be fairly easy to attach a debugger to the server and step through the respawning logic to see what goes wrong.
No tags attached.
related to 0002791confirmed  Moving slightly off a spawn makes you vunerable to join/defect telefrag in team games 
has duplicate 0002577closed AlexMax Telefragging on join, even with other open available spawns 
related to 0001253closed  Team telefrag issue: G_CheckSpot always returns true if the spawn spot is > player height for the sector it's in 
related to 0001032closed Torr Samaho Z-Height support for player starts 
related to 0001499closed  Slight chance that players will spawn on each other (same spawnpoint) 
Issue History
2013-12-31 22:31AlexMaxNew Issue
2014-01-03 11:08Torr SamahoNote Added: 0007862
2014-06-11 15:47WatermelonRelationship addedrelated to 0001253
2014-06-11 15:48WatermelonRelationship addedrelated to 0001032
2014-06-11 15:49WatermelonRelationship addedrelated to 0001499
2014-06-11 15:50WatermelonStatusnew => acknowledged
2014-06-11 15:50WatermelonStatusacknowledged => confirmed
2016-01-29 21:17DuskRelationship addedhas duplicate 0002577
2016-07-15 14:51Ru5tK1ngNote Added: 0015317
2016-07-15 19:17Edward-sanNote Added: 0015318
2016-07-15 19:17Edward-sanStatusconfirmed => feedback
2016-07-15 20:54Edward-sanNote Edited: 0015318bug_revision_view_page.php?bugnote_id=15318#r9282
2016-07-15 21:00Edward-sanNote Added: 0015320
2016-07-15 21:00Edward-sanStatusfeedback => confirmed
2016-07-16 13:07Edward-sanAssigned To => Edward-san
2016-07-16 13:07Edward-sanStatusconfirmed => assigned
2016-07-16 13:11Edward-sanNote Added: 0015327
2016-07-16 13:11Edward-sanStatusassigned => needs review
2016-07-17 11:41Edward-sanNote Edited: 0015327bug_revision_view_page.php?bugnote_id=15327#r9345
2016-07-17 19:35WaTaKiDNote Added: 0015362
2016-07-18 15:35Ru5tK1ngNote Added: 0015375
2016-07-18 22:31AlexMaxNote Added: 0015379
2016-07-18 22:31AlexMaxNote Edited: 0015379bug_revision_view_page.php?bugnote_id=15379#r9357
2016-07-19 00:51Edward-sanNote Added: 0015381
2016-10-09 21:37Edward-sanNote Added: 0015865
2016-10-09 21:37Edward-sanStatusneeds review => needs testing
2016-10-09 21:37Edward-sanProduct Version => 1.4
2016-10-09 21:37Edward-sanTarget Version => 3.0
2016-10-15 16:31Ru5tK1ngNote Added: 0016017
2016-10-15 16:32Ru5tK1ngRelationship addedrelated to 0002791
2016-10-15 16:32Ru5tK1ngStatusneeds testing => resolved
2016-10-15 16:32Ru5tK1ngResolutionopen => fixed
2016-10-15 16:32Ru5tK1ngFixed in Version => 3.0
2018-09-30 21:58Blzut3Statusresolved => closed

Notes
(0007862)
Torr Samaho   
2014-01-03 11:08   
Is the behavior in Skulltag, Zandronum and ZDoom the same?
(0015317)
Ru5tK1ng   
2016-07-15 14:51   
This issue still persists in 2.1.2 and 3.0. I can't reproduce it in ZDoom because spectators don't exist there. Repeatedly spamming changemap or restarting the server never replicated the telefrag issue.
(0015318)
Edward-san   
2016-07-15 19:17   
(edited on: 2016-07-15 20:54)
Which map has the problem? Which flags/settings should be used?

[edit] AlexMax provided me some info on irc:

Quote

<AlexMax> edward-san: Do it on the start map
<AlexMax> there are eight spawns, but only four actual spawn locations
<edward-san> deathmatch mode?
<AlexMax> Try it in duel mode


And managed to reproduce it.

(0015320)
Edward-san   
2016-07-15 21:00   
So, the problem is caused by the second player's body being still a spectator when the deathmatch spot checker code is called.

In fact, when G_CheckSpot is called in function SelectRandomDeathmatchSpot, the second player's mobj flags2 have MF2_THRUACTORS, which makes the function PIT_CheckThing return true, leading the whole P_CheckPosition code ignore the presence of the already present player.

The telefrag happens because after the spot is found the player is spawned and the spectator data is cleared, so P_CheckPosition finds the old player, then the old player is killed.
(0015327)
Edward-san   
2016-07-16 13:11   
(edited on: 2016-07-17 11:41)
Should be fixed with'https://bitbucket.org/zandronum/zandronum-sandbox-stable/commits/da62ad7f93c095f02b93e3f6c5c8b20d05b68536 [^]' (2.x branch).


[edit] For testing purposes I added a merge of the fix (partial, no docs) to 3.0 branch:'https://bitbucket.org/zandronum/zandronum-sandbox/commits/b9b0ff69286e6d9d130509d343fb8c4fc8cbf5bf [^]' .

(0015362)
WaTaKiD   
2016-07-17 19:35   
this 3.0 build contains the above commit: 'https://www.dropbox.com/s/r3tydzxkore1vkc/zandronum-3.0-r160717-1138-b9b0ff6-windows.zip?dl=0 [^]'
(0015375)
Ru5tK1ng   
2016-07-18 15:35   
That build seemed to fix the issue. I couldn't reproduce the bug after trying repeatedly for several minutes.
(0015379)
AlexMax   
2016-07-18 22:31   
Fantastic! Thanks for the attention.

(0015381)
Edward-san   
2016-07-19 00:51   
I'd like to know if the related tickets are solved with that build as well.
(0015865)
Edward-san   
2016-10-09 21:37   
The fix for this specific issue was merged in 3.0 upstream:'https://bitbucket.org/Torr_Samaho/zandronum/commits/3114b070fe24 [^]' . The build in 0002866 should contain it.
(0016017)
Ru5tK1ng   
2016-10-15 16:31   
I pulled the latest changes from Zan 3.0 and my test results were still the same. I couldn't tele frag the opponent by repeatedly joining even after coming off of an intermission screen.