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.
This commit is contained in:
NyakoFox
2026-02-25 20:27:08 -04:00
committed by Ethan Lee
parent deeed00c95
commit 9bcade9776

View File

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