Skip to content

Commit 9bcade9

Browse files
NyakoFoxflibitijibibo
authored andcommitted
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.
1 parent deeed00 commit 9bcade9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

desktop_version/src/Script.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1346,7 +1346,14 @@ void scriptclass::run(void)
13461346
{
13471347
// Allow the gamestate command to bypass statelock, at least for now
13481348
game.state = ss_toi(words[1]);
1349-
game.statedelay = 0;
1349+
if (argexists[2])
1350+
{
1351+
game.statedelay = ss_toi(words[2]);
1352+
}
1353+
else
1354+
{
1355+
game.statedelay = 0;
1356+
}
13501357
}
13511358
else if (words[0] == "textboxactive")
13521359
{

0 commit comments

Comments
 (0)