1 Commits

Author SHA1 Message Date
NyakoFox
9bcade9776 Add statedelay argument to gamestate command
The `gamestate` command has an argument to set the gamestate, but the
statedelay was always set to 0, despite the statedelay being an
important part of the gamestate system. This commit adds an optional
argument to set the statedelay.
2026-02-25 20:32:55 -05:00

View File

@@ -1346,7 +1346,14 @@ void scriptclass::run(void)
{
// Allow the gamestate command to bypass statelock, at least for now
game.state = ss_toi(words[1]);
game.statedelay = 0;
if (argexists[2])
{
game.statedelay = ss_toi(words[2]);
}
else
{
game.statedelay = 0;
}
}
else if (words[0] == "textboxactive")
{