-
Notifications
You must be signed in to change notification settings - Fork 148
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
Fix execNextFrame out of order in preInit #410
Conversation
Is there any reason why we skip the frames between pre and postInit in the first place? |
I'm not seeing any difference between stacked
Interestingly, we moved from preInit to postInit in #312 because of some problem with 3den in 1.58, which seems to have been fixed. But this wouldn't really have any effect except making the first frame run the same as postInit's frame. |
postInit isn't frame 2. It's the frame after all objects are initialized. It only happens to be frame 2 on dedicated servers, because BIS_fnc_initFunctions isn't waiting for |
I think it's weird that we will be doing a Somehow I don't feel like this is worth it just to guarantee the order in which these things are executed. |
Our code did something like
and the order was all wrong and things broke It does add overhead to the adder, not each frame; but still not ideal. I suppose we can just find a different workaround. |
I see. Can you explain why it messes up the order? I still don't understand why that would be just by leaving out a few frames. |
Opps, looks like the problem was simpler than I thought. Fixed by just changing the initial |
And now I understand what the problem was too. Merge? |
Exec next frame uses the logic
diag_frameno != GVAR(nextFrameNo)
,but between preInit and postInit there can be more than 1 frame.
Items can be called out of order and items added can be called in the same frame (see C/D):
Before:
After:
This fix addes an extra conditional, pushing everything into the first buffer until it has been run.