Skip to content

Conversation

jacenhan
Copy link
Contributor

@jacenhan jacenhan commented May 8, 2024

Added a new global script to Base.rte that slows down the game to 1/10th speed when the Buy Menu is open. Uses the current method of slow-motion that manually changes DeltaTime and TimeScale, but it seems to work pretty well. AFAIK there is no way to pause the simulation completely from Lua as of right now (setting the TimeScale to 0 causes all sorts of errors).

This involved opening up the IsBuyGUIVisible function to be able to access it from Lua in ActivityMan.

@Causeless
Copy link
Contributor

So in principle this is okay, but has some serious downsides when it comes to determinism and that the game doesn't work at different DTs altogether well. However, being a global script and not in the C++ (and being that we're not really deterministic yet anyways...), this should be fine.

@pawnishoovy
Copy link
Contributor

yep the old timescale + deltatime trick. as a global script it's fine, if you enable a weirder global script you implicitly agree to your game not being pixel-perfect anyway. only thing i'd add here is mentioning the new exposed function and the globalscript in the changelog.

@Causeless Causeless added this pull request to the merge queue Jun 1, 2024
Merged via the queue into cortex-command-community:development with commit 98544f4 Jun 1, 2024
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

Successfully merging this pull request may close these issues.

3 participants