Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic time diff bug #953

Closed
Nairdaa opened this issue Aug 10, 2020 · 12 comments
Closed

Dynamic time diff bug #953

Nairdaa opened this issue Aug 10, 2020 · 12 comments

Comments

@Nairdaa
Copy link
Contributor

Nairdaa commented Aug 10, 2020

A reminder for our current lazy dev. He knows what to do, but is too busy at the moment.

Steps taken to reproduce: Play, watch the timer suddenly going from for example -0.1 sec to +20 sec and stay +x forever (counting, but wrong).

Replay bots:
bhop_mae
Positon: setpos 1266.043823 423.967499 -29.968689;setang 19.866026 171.646530 0.000000
Style: Scroll

bhop_badges
Starts acting already outside of the startzone
Style: Normal

bhop_mae.zip
bhop_badges.zip

Let me know if you need more. That kind of stuff never happened on log's approach to dynamic time difference.

@Nairdaa
Copy link
Contributor Author

Nairdaa commented Aug 10, 2020

minusnotrng_plusrng.zip example demo playing live with the dynamic timer diff

bhop_mae

@kidfearless
Copy link
Collaborator

I'm unable to reproduce it and have a nagging feeling that you are still running the version that was broken.
https://youtu.be/7pxriZA4jFc
The replay was 2665 frames long at 100 tick giving it a 26 second time. I finished with a 22 second time and a dynamic time difference of around 4 seconds.
Tested on the latest very_good_yes

@Nairdaa
Copy link
Contributor Author

Nairdaa commented Aug 16, 2020

Downloaded latest, compiled, tried again it's still fucked up. Told you to come and see how to reproduce, but you still don't know how to reproduce that even tho I recorded a video for you. Come and see it live how to cause it.

@Nairdaa
Copy link
Contributor Author

Nairdaa commented Aug 16, 2020

[ Heroine ] kebenjekajse : now
♫♫ an idiot sandwich : what happened
[ Heroine ] kebenjekajse : said -10s
[ Heroine ] kebenjekajse : when i started
♫♫ an idiot sandwich : k
[ Heroine ] kebenjekajse : it went away now
♫♫ an idiot sandwich : disappeared?
[ Heroine ] kebenjekajse : yea but back again now :D

@Nairdaa
Copy link
Contributor Author

Nairdaa commented Aug 16, 2020

Also, after updating it's not as fucky as it used to, but still fucks up sometimes.

@Nairdaa
Copy link
Contributor Author

Nairdaa commented Aug 16, 2020

bhop_mae.zip demo of another odd shit

@Nairdaa
Copy link
Contributor Author

Nairdaa commented Aug 16, 2020

Also, when you go back to startzone (not with !r) your dynamic time is not back to 0 when you have more than 10 seconds on the timer (you can have even 30 on it, walk back to startzone, walk out and it will show -10 sec on dynamic timer right away).

Your thing is bugged.

@Nairdaa
Copy link
Contributor Author

Nairdaa commented Aug 16, 2020

sm_r
  StopTimer()
    Shavit_OnStop()
      ClearFrames()
        gA_PlayerFrames.Clear()

callstack of sm_r thats why the shit only resets on !r and not when you enter startzone without !r
fix the prerrun and the dynamic timer will be fixed too

cheers

@kidfearless
Copy link
Collaborator

Also, when you go back to startzone (not with !r) your dynamic time is not back to 0 when you have more than 10 seconds on the timer (you can have even 30 on it, walk back to startzone, walk out and it will show -10 sec on dynamic timer right away).

Your thing is bugged.

I told you many times before that that was an issue. And thinking about it now, if you use a set start plugin it can mess with it as well. Or checkpointing inside the start zone.

@rtldg
Copy link
Collaborator

rtldg commented Oct 17, 2020

That PR fixes a part of this.
Since only shavit_replay_dynamictimedifference_search seconds are searched through the replay frames, the time difference still won't be perfect unless shavit_replay_dynamictimedifference_search is bigger than the replay.
tl;dr: raise shavit_replay_dynamictimedifference_search

I messed around with grabbing the difference for every player every 10th frame (~0.1s on CSS) and then returning that cached but who knows how well servers with many people & a big replay will handle that.
Thoughts me adding that (for testing or whatever) ^ @kidfearless?

@kidfearless
Copy link
Collaborator

Unfortunately sorting through large arraylists is pretty heavy on the server. The way I have it implemented now is pretty accurate until it goes outside the search range. But if a player is 10 seconds ahead or behind the replay than that accuracy shouldn't really matter.

As far as having the skipping frames thing goes, as long as there's a convar to control the number of frames skipped then I think that'll be a great idea.

@Nairdaa
Copy link
Contributor Author

Nairdaa commented Oct 17, 2020

The way that log implemented it worked just fine with 20 ppl on the server and a 10h long replay :/ I still don't understand why it was reworked. It was accurate and really not cpu heavy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants