mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-20 16:31:03 +00:00
Fix realmapnamep not being set with map * and +
This commit is contained in:
parent
37ecb6b48e
commit
7893d08407
1 changed files with 5 additions and 3 deletions
|
@ -5387,17 +5387,19 @@ INT32 G_FindMapByNameOrCode(const char *mapname, char **realmapnamep)
|
|||
if (mapnamelen == 1)
|
||||
{
|
||||
if (mapname[0] == '*') // current map
|
||||
return gamemap;
|
||||
{
|
||||
usemapcode = true;
|
||||
newmapnum = gamemap;
|
||||
}
|
||||
else if (mapname[0] == '+' && mapheaderinfo[gamemap-1]) // next map
|
||||
{
|
||||
usemapcode = true;
|
||||
newmapnum = mapheaderinfo[gamemap-1]->nextlevel;
|
||||
if (newmapnum < 1 || newmapnum > NUMMAPS)
|
||||
{
|
||||
CONS_Alert(CONS_ERROR, M_GetText("NextLevel (%d) is not a valid map.\n"), newmapnum);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
return newmapnum;
|
||||
}
|
||||
}
|
||||
else if (mapnamelen == 2)/* maybe two digit code */
|
||||
|
|
Loading…
Reference in a new issue