MantisBT - Zandronum
View Issue Details
0002712Zandronum[All Projects] Bugpublic2016-04-28 09:242018-09-11 14:24
fr-blood 
Leonard 
normalminoralways
resolvedfixed 
MicrosoftWindowsXP/Vista/7
2.1 
3.13.1 
0002712: Teleport + "On Projectile Inpact" is bugged online
Hi everyone, I found a bug about activing the Teleport function by shooting a switch.

Online if you do that there are chances for you to be teleported and then moved back to your position all that in less than 1 seconde.
1. Launch teleportbug.wad MAP01
2. Take the Chaigun then shoot the switch in front of you
3. You are teleported on the 3D Teleport spot fine offline.
4. Launch it on a server then do the same thing by moving
   * There are chance for you to be teleported or to be moved back at your
     old position.
I've found that bug on Complex Doom Invasion, map CDM13.
No tags attached.
related to 0002859resolved Leonard Gametic-based unlagged seemingly goes out of sync often compared to ping-based unlagged 
? teleportbug.wad (8,363) 2016-04-28 09:24
https://zandronum.com/tracker/file_download.php?file_id=1794&type=bug
Issue History
2016-04-28 09:24fr-bloodNew Issue
2016-04-28 09:24fr-bloodFile Added: teleportbug.wad
2016-04-28 11:45Edward-sanNote Added: 0014762
2016-04-28 11:45Edward-sanStatusnew => confirmed
2016-04-28 11:55Edward-sanNote Edited: 0014762bug_revision_view_page.php?bugnote_id=14762#r8932
2016-04-28 11:56Edward-sanNote Edited: 0014762bug_revision_view_page.php?bugnote_id=14762#r8933
2016-04-28 15:38fr-bloodNote Added: 0014763
2016-04-28 18:19Edward-sanNote Added: 0014764
2016-10-14 13:29unknownnaRelationship addedrelated to 0002859
2016-10-14 13:35unknownnaNote Added: 0015987
2016-10-14 13:41unknownnaNote Edited: 0015987bug_revision_view_page.php?bugnote_id=15987#r9733
2016-10-14 13:45unknownnaNote Edited: 0015987bug_revision_view_page.php?bugnote_id=15987#r9734
2016-10-14 13:58unknownnaNote Edited: 0015987bug_revision_view_page.php?bugnote_id=15987#r9738
2016-10-14 13:59unknownnaNote Edited: 0015987bug_revision_view_page.php?bugnote_id=15987#r9739
2018-08-24 01:36unknownnaNote Added: 0019392
2018-08-24 21:26LeonardNote Added: 0019396
2018-08-24 21:26LeonardAssigned To => Leonard
2018-08-24 21:26LeonardReproducibilityrandom => always
2018-08-24 21:26LeonardStatusconfirmed => needs review
2018-08-24 21:26LeonardTarget Version => 3.1
2018-08-24 21:33LeonardNote Edited: 0019396bug_revision_view_page.php?bugnote_id=19396#r11679
2018-08-26 19:37Torr SamahoNote Added: 0019414
2018-08-26 19:37Torr SamahoStatusneeds review => needs testing
2018-09-11 14:24unknownnaNote Added: 0019505
2018-09-11 14:24unknownnaStatusneeds testing => resolved
2018-09-11 14:24unknownnaResolutionopen => fixed
2018-09-11 14:24unknownnaFixed in Version => 3.1

Notes
(0014762)
Edward-san   
2016-04-28 11:45   
(edited on: 2016-04-28 11:56)
When cl_showonetickpredictionerrors is enabled, this is printed:


(255) WARNING! ServerXYZ does not match local origin after 1 tick!
     X: -2097152, -14680064
     Y: -12582912, 2097152
     Z: 0, 7340032


client prediction issue?

Anyways, does it happen in zandronum 1.0 or even before?

(0014763)
fr-blood   
2016-04-28 15:38   
Tested it like 30 times on Zandronum 1.0, and no it didn't happen.
(0014764)
Edward-san   
2016-04-28 18:19   
The broken changeset is the gametic unlagged addition. When cl_unlagged is off, it doesn't happen.
(0015987)
unknownna   
2016-10-14 13:35   
(edited on: 2016-10-14 13:59)
It seems to be caused by the gametic-unlagged working with the tic buffer. If I disable the tic buffer I don't get the desync when cl_ticsperupdate is 1. I believe it's directly related to my observations in 0002859, as it mostly desyncs when joining the game, when respawning, after map resets and after changemap map changes.

However, even with the tic buffer disabled it still desyncs a lot if cl_ticsperupdate is 2/3.

(0019392)
unknownna   
2018-08-24 01:36   
This is still broken in 3.1, even with all the unlagged fixes. It works with a local connection to the server, but if you have some slight latency (30 ping), it'll break and you'll be teleported back to the wrong spot when shooting the switch.

Quote from unknownna
If I disable the tic buffer I don't get the desync when cl_ticsperupdate is 1.

Weird, it seems to desync now even with the tic buffer off in both 3.0 and 3.1, suggesting that it's mostly caused by the unlagged behavior. It's been broken forever it seems, as I'm able to reproduce it in 1.0, and even Skulltag 98d.
I must be testing it differently this time or something, because IIRC I isolated the issue to the tic buffer in the past, but now it happens all the time regardless of the tic buffer being on or off.

One thing I also observed is that the client spawns multiple TeleportFog actors when teleporting online. It seems to spawn more actors if multiple puffs hit the switch at the same time, for instance when shooting the switch with a shotgun or a SSG.
(0019396)
Leonard   
2018-08-24 21:26   
(edited on: 2018-08-24 21:33)
Unlagged was simply never designed to take in account shots that would teleport players.
The player's position is changed before unlagged restores its recorded position.

Fortunately sector planes aren't affected by this kind of problem as it seems to be impossible to directly change their height (as they always use a thinker as proxy to do so).

PR.

EDIT:

Quote from unknownna
One thing I also observed is that the client spawns multiple TeleportFog actors when teleporting online. It seems to spawn more actors if multiple puffs hit the switch at the same time, for instance when shooting the switch with a shotgun or a SSG.

Considering edward's note, if you manage to find a replicable misprediction feel free to report it.

(0019414)
Torr Samaho   
2018-08-26 19:37   
Thanks for the patch! Added.
(0019505)
unknownna   
2018-09-11 14:24   
It seems that your fix took care of the main issue in addition to the teleport fog issue with multiple puffs (it still spawns multiple fogs for projectiles, but it also happens offline and is a harmless ZDoom behavior). Nice work! Tested with various ping levels and with cl_ticsperupdate 1, 2 and 3.

Quote from Leonard
Considering edward's note, if you manage to find a replicable misprediction feel free to report it.

I didn't notice any mispredictions other than the multiple teleport fog issue with multiple puffs hitting the switch at the same time, which your fix seems to have taken care of.