MantisBT - Zandronum
View Issue Details
0003180Zandronum[All Projects] Suggestionpublic2017-07-06 20:212018-09-30 21:42
Korshun 
Dusk 
normalminoralways
closedfixed 
MicrosoftWindowsXP/Vista/7
3.0-beta 
3.03.0 
0003180: Make Warp/A_Warp not send updates to clients if the actor hasn't moved, like SetActorPosition
When a call to SetActorPosition moves the actor to its current coordinates, no actor position update is sent over the network.

But this is not the case with Warp and A_Warp, which always sends a position update, regardless of whether the actor's coordinates changed as a result.

Implementing this optimization would be very useful when a lot of mostly-immobile serverside actors constantly call A_Warp, and these actors can't be made clientside due to insufficient data about other actors clientside.
No tags attached.
? WarpInPlace.wad (526) 2017-07-06 20:47
/tracker/file_download.php?file_id=2140&type=bug
diff movethingifchanged.diff (4,262) 2017-07-08 13:51
/tracker/file_download.php?file_id=2141&type=bug
Issue History
2017-07-06 20:21KorshunNew Issue
2017-07-06 20:47KorshunFile Added: WarpInPlace.wad
2017-07-06 20:49KorshunNote Added: 0017980
2017-07-06 20:50DuskAssigned To => Dusk
2017-07-06 20:50DuskStatusnew => assigned
2017-07-08 13:50DuskNote Added: 0017988
2017-07-08 13:51DuskFile Added: movethingifchanged.diff
2017-07-08 13:51DuskStatusassigned => needs review
2017-07-09 20:23Ru5tK1ngNote Added: 0017995
2017-07-09 20:23Ru5tK1ngStatusneeds review => needs testing
2017-07-09 20:23Ru5tK1ngTarget Version => 3.0
2017-07-10 02:47KaminskyNote Added: 0018001
2017-07-10 07:18DuskStatusneeds testing => resolved
2017-07-10 07:18DuskFixed in Version => 3.0
2017-07-10 07:18DuskResolutionopen => fixed
2018-09-30 21:42Blzut3Statusresolved => closed

Notes
(0017980)
Korshun   
2017-07-06 20:49   
Uploaded a test wad, as requested.

Use "summon TestActor", the test actor just calls a script that does Warp(0, 0, 0, 0, 0, 0), which results in no position change, but a lot of traffic, if you spawn a dozen TestActors.
(0017988)
Dusk   
2017-07-08 13:50   
I devised two possible fixes for this:

1) check whether the angle changed and control the CM_ANGLE bit passed to SERVERCOMMANDS_MoveThing with it. However, this results in the server flooding the client with MoveThing commands only telling to reuse x, y and z. If we can just suppress these commands entirely, then this would solve the problem.

2) differentiate between two position states and send updates to the client. This doesn't require a change to MoveThing packet sending but requires more code. I've attached this solution as a diff.
(0017995)
Ru5tK1ng   
2017-07-09 20:23   
Commit was added here.
(0018001)
Kaminsky   
2017-07-10 02:47   
I tried this out on a custom server. The Warp/A_Warp functions didn't create any traffic when the actor was warped in the same position as it was located.

I summoned a couple of custom monsters which spawned a child actor that constantly warped close to them. While the monsters were stationary, no net traffic was produced, but whenever the monsters moved, the change in position caused the orbs to use bandwidth when warped, as expected.