mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-31 21:50:48 +00:00
Move the numerical arg check below so that the string gets checked first (who decided to give them such similar names anyway).
This commit is contained in:
parent
c8ae28bbaf
commit
4d716cb170
1 changed files with 14 additions and 14 deletions
|
@ -1621,13 +1621,6 @@ static void ParseTextmapLinedefParameter(UINT32 i, char *param, char *val)
|
|||
P_SetLinedefV1(i, atol(val));
|
||||
else if (fastcmp(param, "v2"))
|
||||
P_SetLinedefV2(i, atol(val));
|
||||
else if (fastncmp(param, "arg", 3) && strlen(param) > 3)
|
||||
{
|
||||
size_t argnum = atol(param + 3);
|
||||
if (argnum >= NUMLINEARGS)
|
||||
return;
|
||||
lines[i].args[argnum] = atol(val);
|
||||
}
|
||||
else if (strlen(param) == 7 && fastncmp(param, "arg", 3) && fastncmp(param + 4, "str", 3))
|
||||
{
|
||||
size_t argnum = param[3] - '0';
|
||||
|
@ -1636,6 +1629,13 @@ static void ParseTextmapLinedefParameter(UINT32 i, char *param, char *val)
|
|||
lines[i].stringargs[argnum] = Z_Malloc(strlen(val) + 1, PU_LEVEL, NULL);
|
||||
M_Memcpy(lines[i].stringargs[argnum], val, strlen(val) + 1);
|
||||
}
|
||||
else if (fastncmp(param, "arg", 3) && strlen(param) > 3)
|
||||
{
|
||||
size_t argnum = atol(param + 3);
|
||||
if (argnum >= NUMLINEARGS)
|
||||
return;
|
||||
lines[i].args[argnum] = atol(val);
|
||||
}
|
||||
else if (fastcmp(param, "sidefront"))
|
||||
lines[i].sidenum[0] = atol(val);
|
||||
else if (fastcmp(param, "sideback"))
|
||||
|
@ -1720,13 +1720,6 @@ static void ParseTextmapThingParameter(UINT32 i, char *param, char *val)
|
|||
else if (fastcmp(param, "ambush") && fastcmp("true", val))
|
||||
mapthings[i].options |= MTF_AMBUSH;
|
||||
|
||||
else if (fastncmp(param, "arg", 3) && strlen(param) > 3)
|
||||
{
|
||||
size_t argnum = atol(param + 3);
|
||||
if (argnum >= NUMMAPTHINGARGS)
|
||||
return;
|
||||
mapthings[i].args[argnum] = atol(val);
|
||||
}
|
||||
else if (strlen(param) == 7 && fastncmp(param, "arg", 3) && fastncmp(param + 4, "str", 3))
|
||||
{
|
||||
size_t argnum = param[3] - '0';
|
||||
|
@ -1735,6 +1728,13 @@ static void ParseTextmapThingParameter(UINT32 i, char *param, char *val)
|
|||
mapthings[i].stringargs[argnum] = Z_Malloc(strlen(val) + 1, PU_LEVEL, NULL);
|
||||
M_Memcpy(mapthings[i].stringargs[argnum], val, strlen(val) + 1);
|
||||
}
|
||||
else if (fastncmp(param, "arg", 3) && strlen(param) > 3)
|
||||
{
|
||||
size_t argnum = atol(param + 3);
|
||||
if (argnum >= NUMMAPTHINGARGS)
|
||||
return;
|
||||
mapthings[i].args[argnum] = atol(val);
|
||||
}
|
||||
}
|
||||
|
||||
/** From a given position table, run a specified parser function through a {}-encapsuled text.
|
||||
|
|
Loading…
Reference in a new issue