Merge branch 'notutclear' into 'master'
Fix clearing maps/unlockables causing crashes and hangs. See merge request STJr/SRB2Internal!609
This commit is contained in:
commit
bbc5d33266
|
@ -1301,7 +1301,7 @@ static void SV_SendServerInfo(INT32 node, tic_t servertime)
|
||||||
|
|
||||||
M_Memcpy(netbuffer->u.serverinfo.mapmd5, mapmd5, 16);
|
M_Memcpy(netbuffer->u.serverinfo.mapmd5, mapmd5, 16);
|
||||||
|
|
||||||
if (*mapheaderinfo[gamemap-1]->lvlttl)
|
if (mapheaderinfo[gamemap-1] && *mapheaderinfo[gamemap-1]->lvlttl)
|
||||||
{
|
{
|
||||||
char *read = mapheaderinfo[gamemap-1]->lvlttl, *writ = netbuffer->u.serverinfo.maptitle;
|
char *read = mapheaderinfo[gamemap-1]->lvlttl, *writ = netbuffer->u.serverinfo.maptitle;
|
||||||
while (writ < (netbuffer->u.serverinfo.maptitle+32) && *read != '\0')
|
while (writ < (netbuffer->u.serverinfo.maptitle+32) && *read != '\0')
|
||||||
|
@ -1321,12 +1321,13 @@ static void SV_SendServerInfo(INT32 node, tic_t servertime)
|
||||||
|
|
||||||
netbuffer->u.serverinfo.maptitle[32] = '\0';
|
netbuffer->u.serverinfo.maptitle[32] = '\0';
|
||||||
|
|
||||||
if (!(mapheaderinfo[gamemap-1]->levelflags & LF_NOZONE))
|
if (mapheaderinfo[gamemap-1] && !(mapheaderinfo[gamemap-1]->levelflags & LF_NOZONE))
|
||||||
netbuffer->u.serverinfo.iszone = 1;
|
netbuffer->u.serverinfo.iszone = 1;
|
||||||
else
|
else
|
||||||
netbuffer->u.serverinfo.iszone = 0;
|
netbuffer->u.serverinfo.iszone = 0;
|
||||||
|
|
||||||
netbuffer->u.serverinfo.actnum = mapheaderinfo[gamemap-1]->actnum;
|
if (mapheaderinfo[gamemap-1])
|
||||||
|
netbuffer->u.serverinfo.actnum = mapheaderinfo[gamemap-1]->actnum;
|
||||||
|
|
||||||
p = PutFileNeeded();
|
p = PutFileNeeded();
|
||||||
|
|
||||||
|
|
|
@ -286,7 +286,7 @@ static void clear_levels(void)
|
||||||
// we may as well try to save some memory, right?
|
// we may as well try to save some memory, right?
|
||||||
for (i = 0; i < NUMMAPS; ++i)
|
for (i = 0; i < NUMMAPS; ++i)
|
||||||
{
|
{
|
||||||
if (!mapheaderinfo[i])
|
if (!mapheaderinfo[i] || i == (tutorialmap-1))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Custom map header info
|
// Custom map header info
|
||||||
|
|
|
@ -6686,7 +6686,10 @@ static void M_DrawChecklist(void)
|
||||||
{
|
{
|
||||||
if (unlockables[i].name[0] == 0 //|| unlockables[i].nochecklist
|
if (unlockables[i].name[0] == 0 //|| unlockables[i].nochecklist
|
||||||
|| !unlockables[i].conditionset || unlockables[i].conditionset > MAXCONDITIONSETS)
|
|| !unlockables[i].conditionset || unlockables[i].conditionset > MAXCONDITIONSETS)
|
||||||
|
{
|
||||||
|
i += 1;
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
V_DrawString(currentMenu->x, y, ((unlockables[i].unlocked) ? V_GREENMAP : V_TRANSLUCENT)|V_ALLOWLOWERCASE, ((unlockables[i].unlocked || !unlockables[i].nochecklist) ? unlockables[i].name : M_CreateSecretMenuOption(unlockables[i].name)));
|
V_DrawString(currentMenu->x, y, ((unlockables[i].unlocked) ? V_GREENMAP : V_TRANSLUCENT)|V_ALLOWLOWERCASE, ((unlockables[i].unlocked || !unlockables[i].nochecklist) ? unlockables[i].name : M_CreateSecretMenuOption(unlockables[i].name)));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue