MantisBT - Zandronum
View Issue Details
0002293Zandronum[All Projects] Bugpublic2015-06-08 19:472018-09-30 21:37
unknownna 
Edward-san 
highmajoralways
closedfixed 
2.0 
2.12.1 
0002293: Clients build stairs without any delay between steps causing unnecessary prediction issues online
While investigating a client prediction issue with stairs I discovered that clients actually aren't informed of the delay time to wait between steps when building stairs. This causes the clients to build stairs instantly if the speed is set to a high value, which in turn causes the clients to greatly mispredict their movement.
1. zandronum -file stairs_01.wad -host
2. zandronum -file stairs_01.wad -connect localhost
3. Join the game.
4. Push the switch in front of you.
27:Stairs_BuildUp (tag, speed, height, delay, reset)
217:Stairs_BuildUpDoom (tag, speed, height, delay, reset)
26:Stairs_BuildDown (tag, speed, height, delay, reset)
No tags attached.
related to 0002294feedback  Very evident misprediction of movement on raising floors in general 
? stairs_01.wad (42,733) 2015-06-08 19:47
/tracker/file_download.php?file_id=1534&type=bug
Issue History
2015-06-08 19:47unknownnaNew Issue
2015-06-08 19:47unknownnaFile Added: stairs_01.wad
2015-06-08 19:47unknownnaStatusnew => confirmed
2015-06-08 19:55unknownnaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=7322#r7322
2015-06-10 13:26Edward-sanNote Added: 0012634
2015-06-10 13:26Edward-sanAssigned To => Edward-san
2015-06-10 13:26Edward-sanStatusconfirmed => needs review
2015-06-10 13:28Edward-sanNote Edited: 0012634bug_revision_view_page.php?bugnote_id=12634#r7359
2015-06-10 13:28Edward-sanNote Edited: 0012634bug_revision_view_page.php?bugnote_id=12634#r7360
2015-06-10 13:33Edward-sanTarget Version => 2.1
2015-06-10 13:37unknownnaNote Added: 0012635
2015-06-10 15:11Edward-sanNote Added: 0012637
2015-06-10 15:44Edward-sanNote Edited: 0012637bug_revision_view_page.php?bugnote_id=12637#r7362
2015-06-10 19:38unknownnaNote Added: 0012640
2015-06-10 19:48unknownnaRelationship addedrelated to 0002294
2015-06-13 10:14Torr SamahoNote Added: 0012677
2015-06-13 10:27Torr SamahoStatusneeds review => needs testing
2015-06-13 10:27cobaltNote Added: 0012679
2015-06-24 22:45DuskStatusneeds testing => resolved
2015-06-24 22:45DuskFixed in Version => 2.2
2015-06-24 22:45DuskResolutionopen => fixed
2015-06-24 22:47DuskFixed in Version2.2 => 2.1
2018-09-30 21:37Blzut3Statusresolved => closed

Notes
(0012634)
Edward-san   
2015-06-10 13:26   
(edited on: 2015-06-10 13:28)
Fixed in'https://bitbucket.org/crimsondusk/zandronum-sandbox-stable/commits/9b301d2397dcaf050d2a84b40c8d331817f1eba5 [^]' .

There's a little imperfection: online one stair completes a little bit before the other ongoing delayed stairs and it's caused, AFAIK, by the absence of the sector prediction.

Torr, I'd like to reduce the bandwidth by passing 'short' to these delay parts of the packet instead of 'long', but this implies not supporting any pwad which uses veeeery long delays/etc. Do you think it could be a good compromise?

(0012635)
unknownna   
2015-06-10 13:37   
Nice work, Edward-san! But I must say that I don't like the idea of not supporting any PWADs that might happen to use long delays.
(0012637)
Edward-san   
2015-06-10 15:11   
(edited on: 2015-06-10 15:44)
In the meantime, can you try this build from WaTaKiD? This contains my fix:'https://www.dropbox.com/s/tnnkv509im4evpy/zandronum-2.1-150610-1318-9b301d2-windows.zip?dl=0 [^]'

(0012640)
unknownna   
2015-06-10 19:38   
The example WAD seems to work fine in that build. Great job! One thing that surprises me is how the client movement prediction gets slightly better if the delay between steps is set to a value higher than 0. And for some reason the prediction seems to be better on Stairs_BuildUp compared to Stairs_BuildUpDoom and Generic_Stairs, but I could be wrong. Are they handled differently from one another?
(0012677)
Torr Samaho   
2015-06-13 10:14   
I added your patch.

Quote from Edward-san

Torr, I'd like to reduce the bandwidth by passing 'short' to these delay parts of the packet instead of 'long', but this implies not supporting any pwad which uses veeeery long delays/etc. Do you think it could be a good compromise?

Considering that this function shouldn't be called too often I think it's better to keep this at long.
(0012679)
cobalt   
2015-06-13 10:27   
Issue addressed by commit 9c904ea57373: - Fixed: The delayed stairs building movers were not handled properly online (addresses 2293).
Committed by Edoardo Prezioso [edward-san] on Wednesday 10 June 2015 15:18:15

Changes in files:

 docs/zandronum-history.txt | 1 +
 src/cl_main.cpp | 74 +++++++++++++++++++++++++++++++
 src/network_enums.h | 1 +
 src/p_floor.cpp | 102 +++++++++++++++++++++++++++----------------
 src/p_spec.h | 12 +++++
 src/sv_commands.cpp | 28 ++++++++++++
 src/sv_commands.h | 1 +
 7 files changed, 181 insertions(+), 38 deletions(-)