MantisBT - Zandronum
View Issue Details
0000331Zandronum[All Projects] Bugpublic2011-03-18 02:312018-05-07 09:48
unknownna 
Leonard 
highmajoralways
resolvedfixed 
 
3.13.1 
0000331: Improved client-side prediction for Sector_SetFriction
The movement is choppy.
A classic CTF map from the ZDCTF map packs (MAP15: Sewers Smell Bad) utilizes this effect. Special thanks to Spirit Soldier for reporting this issue.
client, prediction, Sector_SetFriction
related to 0000130closed Torr Samaho client prediction is sometimes wrong 
? sector_setfriction_test.wad (1,008) 2011-03-18 02:34
https://zandronum.com/tracker/file_download.php?file_id=202&type=bug
? sector_setfriction_test_02.wad (1,536) 2015-06-06 14:02
https://zandronum.com/tracker/file_download.php?file_id=1520&type=bug
Issue History
2011-03-18 02:31unknownnaNew Issue
2011-03-18 02:34unknownnaFile Added: sector_setfriction_test.wad
2011-03-18 07:33unknownnaAdditional Information Updatedbug_revision_view_page.php?rev_id=583#r583
2011-04-30 06:10unknownnaPrioritynormal => high
2011-07-18 07:50unknownnaRelationship addedrelated to 0000130
2011-07-18 08:09unknownnaNote Added: 0001921
2013-08-01 14:19WatermelonNote Added: 0006882
2013-09-18 16:53WatermelonAssigned To => Watermelon
2013-09-18 16:53WatermelonStatusnew => confirmed
2013-09-22 15:26QentNote Added: 0007266
2013-09-22 15:29QentNote Edited: 0007266bug_revision_view_page.php?bugnote_id=7266#r4064
2014-05-05 22:28WatermelonAssigned ToWatermelon =>
2014-10-09 00:17WatermelonAssigned To => Watermelon
2014-10-09 00:17WatermelonStatusconfirmed => assigned
2014-10-27 02:09WatermelonAssigned ToWatermelon =>
2014-10-27 02:09WatermelonStatusassigned => feedback
2015-06-06 14:00unknownnaNote Added: 0012542
2015-06-06 14:00unknownnaStatusfeedback => new
2015-06-06 14:02unknownnaFile Added: sector_setfriction_test_02.wad
2017-09-11 18:55WaTaKiDStatusnew => needs review
2017-09-11 19:02LeonardNote Added: 0018278
2017-09-17 12:18Torr SamahoNote Added: 0018300
2017-09-17 12:19Torr SamahoStatusneeds review => feedback
2017-10-02 20:45LeonardStatusfeedback => needs review
2017-10-02 20:46LeonardStatusneeds review => needs testing
2017-10-12 20:05LeonardAssigned To => Leonard
2017-10-12 20:05LeonardCategorySuggestion => Bug
2017-10-12 20:05LeonardTarget Version => 3.1
2018-05-07 01:10StrikerMan780Note Added: 0019209
2018-05-07 09:48LeonardReproducibilityN/A => always
2018-05-07 09:48LeonardStatusneeds testing => resolved
2018-05-07 09:48LeonardResolutionopen => fixed
2018-05-07 09:48LeonardFixed in Version => 3.1

Notes
(0001921)
unknownna   
2011-07-18 08:09   
D2CTF4 also uses this effect. It works well in ZDaemon.
(0006882)
Watermelon   
2013-08-01 14:19   
This bug is pretty annoying in idl map15 and kills it from being played. Any easy solutions to this?
(0007266)
Qent   
2013-09-22 15:26   
(edited on: 2013-09-22 15:29)
I believe that the problem is Sector_SetFriction's not working at all when used on a linedef. The client predicts that it should have an effect, but it does not. It works as expected (and client prediction is perfect) when used from an OPEN script.

(0012542)
unknownna   
2015-06-06 14:00   
Quote from Qent
It works as expected (and client prediction is perfect) when used from an OPEN script.

Indeed, you're right.

Quote from Qent
I believe that the problem is Sector_SetFriction's not working at all when used on a linedef.

I'm going to assume that the client isn't informed of linedef specials in order to save bandwidth. In that case, there's no need to improve the prediction, clients simply need to know of linedef specials when connecting to servers.
(0018278)
Leonard   
2017-09-11 19:02   
Pull request.

Sector_SetFriction on linedefs change the sector's friction but doesn't actually enable it with the sector special:
p_spec.cpp, line 2444:

        sectors[s].friction = friction;
        sectors[s].movefactor = movefactor;
        if (alterFlag)
        {
            // When used inside a script, the sectors' friction flags
            // can be enabled and disabled at will.
            if (friction == ORIG_FRICTION)
            {
                sectors[s].special &= ~FRICTION_MASK;
            }
            else
            {
                sectors[s].special |= FRICTION_MASK;
            }

            // [BC] If we're the server, update clients about this friction change.
            if ( NETWORK_GetState( ) == NETSTATE_SERVER )
                SERVERCOMMANDS_SetSectorFriction( s );
        }

But the server informs connecting clients of the friction change regardless of the friction flag as seen in the pull request.
(0018300)
Torr Samaho   
2017-09-17 12:18   
Please see my comment on bitbucket.
(0019209)
StrikerMan780   
2018-05-07 01:10   
Tried on the latest 3.1 build here:'https://zandronum.com/downloads/testing/3.1/ZandroDev3.1-180429-2031windows.zip [^]'

Tested both wads, no prediction issues.