-
Notifications
You must be signed in to change notification settings - Fork 69
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
Allow mods to gracefully prevent geoscape tick #425
Comments
Purely out of curiosity, what are the go-to use cases for this? Also, isn't ticking done a lot? Triggering an event for every tick is not deemed excessive? |
CI has 2 uses for this:
In both cases, nothing must happen between opening the geoscape and the screen opening on top of it. Geoscape is actually a bit of a painful opening and at least one tick will happen even if you try to instantly open another screen on top (which normally pauses the time).
Robojumper has done testing and triggering events with 0 listeners is extremely cheap. So subscribing to this with a listener template is indeed a bad idea, but CI doesn't do that, it uses "temporary" listener registrations only. In hindsight, the only bad aspect is the GC thrashing with a new tuple every frame. I don't expect unreal's GC to break apart due to this (especially since the reachability path is very simple - it's either directly in a root or not reachable at all), but it could've been easily avoided using either a singleton tuple or the delegates approach. Alas, it is too late now due to BC |
XGGeoscape
:Adding an event before
if (fGameTime == 0)
will allow mods to prevent the game tick. Eg. opening a screen upon entering geoscape, but only when the game is ready to tick (no other interactions are going on)The text was updated successfully, but these errors were encountered: