MantisBT - Zandronum
View Issue Details
0000260Zandronum[All Projects] Bugpublic2011-01-13 10:372018-09-30 20:10
TheMisterCat 
Torr Samaho 
normaltweakalways
closedfixed 
MicrosoftWindowsXP/Vista/7
98d 
1.0 
0000260: Sector_SetWind and SetCurrent do not set the correct strengths when called multiple times
Both the script and line versions of these actions, if called repeatedly to the same angle/strength, will return a multiple based on how many times the action has been called. The issue has been fixed in zdoom and would require a port. I'd really appreciate this as my mod relies heavily on wind strengths

Call Sector_SetWind or Sector_SetCurrent multiple times using the same arguments (direction, speed) in a pusher-activated sector with a +windthrust actor spawner. Watch the erratic results
[url]http://flandre.zdoom.org/viewtopic.php?f=7&t=27506&p=525969&hilit=Sector_SetWind&sid=297e985d6a5e98834b3cd21206e04dab#p525969[/url]
thread explaining this bug
Sector_SetWind
? setwind_setcurrent_scrollfloor_test.wad (10,020) 2011-01-23 05:21
/tracker/file_download.php?file_id=137&type=bug
Issue History
2011-01-13 10:37TheMisterCatNew Issue
2011-01-13 14:50TheMisterCatNote Added: 0000809
2011-01-20 13:29Torr SamahoAssigned To => Torr Samaho
2011-01-20 13:29Torr SamahoStatusnew => assigned
2011-01-22 18:19Torr SamahoNote Added: 0000851
2011-01-22 20:42Torr SamahoNote Added: 0000854
2011-01-22 20:42Torr SamahoStatusassigned => feedback
2011-01-23 05:20unknownnaNote Added: 0000855
2011-01-23 05:21unknownnaFile Added: setwind_setcurrent_scrollfloor_test.wad
2011-01-23 16:42Torr SamahoNote Added: 0000857
2011-01-24 05:03unknownnaNote Added: 0000862
2011-01-24 05:07TheMisterCatNote Added: 0000863
2011-01-24 05:07TheMisterCatStatusfeedback => assigned
2011-01-27 02:59Torr SamahoNote Added: 0000878
2011-01-27 03:00Torr SamahoNote Edited: 0000878bug_revision_view_page.php?bugnote_id=878#r404
2011-01-27 03:01Torr SamahoStatusassigned => feedback
2011-01-27 04:07unknownnaNote Added: 0000880
2011-01-27 13:07Torr SamahoNote Added: 0000882
2011-01-29 02:21unknownnaNote Added: 0000887
2011-01-30 00:23Torr SamahoNote Added: 0000903
2011-01-30 00:24Torr SamahoStatusfeedback => resolved
2011-01-30 00:24Torr SamahoFixed in Version => 1.0
2011-01-30 00:24Torr SamahoResolutionopen => fixed
2012-06-09 13:22Torr SamahoCategoryGeneral => Bug
2018-09-30 20:10Blzut3Statusresolved => closed

Notes
(0000809)
TheMisterCat   
2011-01-13 14:50   
I forgot to mention that there is also a bug with Sector_SetWind. If run from a script, it doesn't notify the clients of the change.
(0000851)
Torr Samaho   
2011-01-22 18:19   
I backported the ZDoom fix, but when looking into the client update issue, I noticed that there is no netcode at all for any of the pushers. I'll check how much work it'll be to write a proper net handling for this.
(0000854)
Torr Samaho   
2011-01-22 20:42   
Ok, I worked on this for a while and it turned out to be more work than I expected. Nevertheless, I think I have fixed some of the issues. Clients should now be informed about SetWind changes if they are in the game when the change happens (newly connecting clients are not informed yet about the Wind changes that happened before the connected). Furthermore, I noticed that the client side prediction of DPusher (and thus of SetWind) didn't work. This should also be fixed now. Please test this binary thoroughly.
(0000855)
unknownna   
2011-01-23 05:20   
The clients are informed about the changes if they're in-game. But "Sector_SetCurrent" doesn't seem to be working as intended. It gets stronger and stronger when you activate it.

And the client-side prediction also feels choppy/laggy if you're playing with a ping of approximately 200ms+. Particularly noticeable when jumping in the sectors. I made a new example WAD.
(0000857)
Torr Samaho   
2011-01-23 16:42   
> But "Sector_SetCurrent" doesn't seem to be working as intended. It gets stronger and stronger when you activate it.

Does this also happen offline? If so, it is most likely a ZDoom bug (probably already fixed in ZDoom).

> And the client-side prediction also feels choppy/laggy if you're playing with a ping of approximately 200ms+. Particularly noticeable when jumping in the sectors.

You are right, the prediction is not perfect yet. It's much better though than without the prediction fix (I can provide a binary without the fix if anybody is interested in testing the effects). I'm not quite sure if it is feasible to further improve the prediction.
(0000862)
unknownna   
2011-01-24 05:03   
> Does this also happen offline? If so, it is most likely a ZDoom bug (probably already fixed in ZDoom).

Yes. Apparently it was fixed in the linked thread. If so, did you backport the fix from there?

> You are right, the prediction is not perfect yet. It's much better though than without the prediction fix (I can provide a binary without the fix if anybody is interested in testing the effects). I'm not quite sure if it is feasible to further improve the prediction.

Well, it would be a good thing to have in the long run, considering that Skulltag is a multiplayer-oriented source port. It would be great if you managed to perfect it even further. IMHO, the more client-side prediction, the better.
(0000863)
TheMisterCat   
2011-01-24 05:07   
Thanks a bunch, Torr. This seems to work fine for all purposes. Given that projectiles which reach a certain speed usually tend to jitter a bit anyway, prediction over 200ms isn't too much of a problem.
(0000878)
Torr Samaho   
2011-01-27 02:59   
(edited on: 2011-01-27 03:00)
It was more work than I expected, but this should now hopefully also inform newly connecting clients about wind changes that happened before they connected).

> Yes. Apparently it was fixed in the linked thread. If so, did you backport the fix from there?

Not yet, but I'll do. So far I only backported the Sector_SetWind / Sector_SetCurrent from ZDoom revision 2144.

> IMHO, the more client-side prediction, the better.

In general I agree. The question is though how I should distribute my limited resources. Since the prediction IMO is already working quite well, it's probably more effective if I fix more serious bugs before further trying to refine the prediction here. You could create a feature request for an improved pusher prediction, so that this issue is not forgotten.

(0000880)
unknownna   
2011-01-27 04:07   
> It was more work than I expected, but this should now hopefully also inform newly connecting clients about wind changes that happened before they connected).

Hmm, one thing I noticed is that the prediction becomes laggier when you reconnect, even without any ping emulation. Perhaps this is due to the "suspend" function in the ACS script. Spectators are also affected by the wind/current.

Steps to reproduce:

1) Start a server with the example WAD.
2) Connect a client to the server and join the game.
3) Push the first switch twice.
4) "reconnect" in the console.
5) Once reconnected, move into the wind sector as a spectator. You will be pushed east in a smooth manner.
6) Join the game and move into the wind sector. You will be pushed north in a laggy manner.

> In general I agree. The question is though how I should distribute my limited resources. Since the prediction IMO is already working quite well, it's probably more effective if I fix more serious bugs before further trying to refine the prediction here.

I definitely agree with you on this.

> You could create a feature request for an improved pusher prediction, so that this issue is not forgotten.

I'll keep that in mind, thanks.
(0000882)
Torr Samaho   
2011-01-27 13:07   
This should fix the issues that happen after reconnect when one of the scripts has been executed more than once and also contains the ZDoom SetCurrent fix. I didn't have a chance to exclude spectators from the effect of pushers yet though.
(0000887)
unknownna   
2011-01-29 02:21   
It fixed the issues.
(0000903)
Torr Samaho   
2011-01-30 00:23   
Great. Then all bugs here should be resolved. If desired, a possibly enhanced prediction can be discussed in a feature request ticket.