anicolao / npa

Neptune's Pride Agent
GNU General Public License v3.0
8 stars 6 forks source link

Merging APIs affects the Production timer #3

Closed Skilly146 closed 1 year ago

Skilly146 commented 1 year ago

What

When merging (doesn't affect view as far as I can tell) apis with a player the production timer becomes off from the actual time by about 10 seconds. When you merge more players the timer gets off by more time.

Why

Seems like the tick_fragment value from the merged players api is replacing the accurate one from the actual server and since there is some delay in making the api call and displaying it to the user that would explain why it is off. I assume the reason it only happens with merge is because view doesn't touch as many variables or something

How

Seems like all we have to do to fix this is have merge api stop viewing the merged players tick_fragment and only use the server provided one. While we are fixing this we might as well limit a couple other things that aren't necessary like game name, settings, etc, to avoid any future problems

Note

I made this issue on the SAT repo as well since both extensions are affected by the bug

anicolao commented 1 year ago

I think the problem is the reverse of what you say. It's that the tick_fragment is still the old tick_fragment but the now variable is also set. deleting now from the scan will probably fix it.

anicolao commented 1 year ago

Well turns out that we were both wrong. The problem was that tick_fragment wasn't being merged at all, and needs to be merged for it to work properly.

anicolao commented 1 year ago

Fixed in ee3063c78a366159fae126b850cbbfbdb8ea001e