Fixed "vstr" in the nextmap argument

This commit is contained in:
smallmodel 2023-08-19 19:42:30 +02:00
parent 84f55f627e
commit ec8eaacc69
No known key found for this signature in database
GPG key ID: A96F163ED4891440

View file

@ -1653,6 +1653,15 @@ void G_ExitLevel(void)
// Stay on the same map since no nextmap was set
Com_sprintf(command, sizeof(command), "restart\n");
gi.SendConsoleCommand(command);
}
else if (level.nextmap == level.mapname) {
// Stay on the same map if it's the same as the current map
Com_sprintf(command, sizeof(command), "restart\n");
gi.SendConsoleCommand(command);
} else if (!Q_stricmpn(level.nextmap, "vstr", 4) ) {
// alias on another map
strcpy(command, level.nextmap);
gi.SendConsoleCommand(command);
} else // use the level.nextmap variable
{
Com_sprintf(command, sizeof(command), "gamemap \"%s\"\n", level.nextmap.c_str());