Revert "fix some G_BuildMapTitle memleaks"
This reverts commit e5159e13dd.
This commit is contained in:
1 parent
afb96c60cb
commit
f2b21c6055
3 files changed
+6
-25
No files matched your search
+1
-4
@@ -3158,10 +3158,7 @@ static void Command_ReplayMarker(void)
|
||||
demo.savemode = DSM_WILLAUTOSAVE;
|
||||
if (adjustedleveltime < 0)
|
||||
adjustedleveltime = 0;
|
||||
char *title = G_BuildMapTitle(gamemap);
|
||||
snprintf(demo.titlename, 64, "%s [%i:%02d/%.5s]", title, G_TicsToMinutes(adjustedleveltime, false), G_TicsToSeconds(adjustedleveltime), modeattacking ? "Record Attack" : connectedservername);
|
||||
Z_Free(title);
|
||||
|
||||
snprintf(demo.titlename, 64, "%s [%i:%02d/%.5s]", G_BuildMapTitle(gamemap), G_TicsToMinutes(adjustedleveltime, false), G_TicsToSeconds(adjustedleveltime), modeattacking ? "Record Attack" : connectedservername);
|
||||
CONS_Printf("Replay will be saved!\n");
|
||||
}
|
||||
}
|
||||
|
||||
+3
-15
@@ -4621,14 +4621,8 @@ INT32 G_FindMap(const char *mapname, char **foundmapnamep,
|
||||
for (i = 0, mapnum = 1; i < NUMMAPS; ++i, ++mapnum)
|
||||
if (mapheaderinfo[i])
|
||||
{
|
||||
char *title = G_BuildMapTitle(mapnum);
|
||||
if (!( realmapname = title ))
|
||||
{
|
||||
Z_Free(title);
|
||||
if (!( realmapname = G_BuildMapTitle(mapnum) ))
|
||||
continue;
|
||||
}
|
||||
|
||||
Z_Free(title);
|
||||
|
||||
aprop = realmapname;
|
||||
|
||||
@@ -4700,9 +4694,7 @@ INT32 G_FindMap(const char *mapname, char **foundmapnamep,
|
||||
}
|
||||
if (newmapnum)
|
||||
{
|
||||
char *title = G_BuildMapTitle(newmapnum);
|
||||
newmapname = title;
|
||||
Z_Free(title);
|
||||
newmapname = G_BuildMapTitle(newmapnum);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4792,11 +4784,7 @@ INT32 G_FindMapByNameOrCode(const char *mapname, char **realmapnamep)
|
||||
return 0;
|
||||
|
||||
if (realmapnamep)
|
||||
{
|
||||
char *title = G_BuildMapTitle(newmapnum);
|
||||
(*realmapnamep) = title;
|
||||
Z_Free(title);
|
||||
}
|
||||
(*realmapnamep) = G_BuildMapTitle(newmapnum);
|
||||
}
|
||||
|
||||
return newmapnum;
|
||||
|
||||
+2
-6
@@ -2735,16 +2735,12 @@ static void HU_DrawRankings(void)
|
||||
//V_DrawString(4, 188, hilicol|V_SNAPTOBOTTOM|V_SNAPTOLEFT, "Record Attack");
|
||||
//else
|
||||
//V_DrawString(4, 188, hilicol|V_SNAPTOBOTTOM|V_SNAPTOLEFT, gametype_cons_t[gametype].strvalue);
|
||||
|
||||
char *maptitle = G_BuildMapTitle(gamemap);
|
||||
|
||||
// draw the current map in the lower right if theres none just say its unknown
|
||||
if (!maptitle)
|
||||
if (!G_BuildMapTitle(gamemap))
|
||||
V_DrawString(4, 188, hilicol|V_SNAPTOBOTTOM|V_SNAPTOLEFT, "UNKNOWN");
|
||||
else
|
||||
V_DrawString(4, 188, hilicol|V_SNAPTOBOTTOM|V_SNAPTOLEFT, maptitle);
|
||||
|
||||
Z_Free(maptitle);
|
||||
V_DrawString(4, 188, hilicol|V_SNAPTOBOTTOM|V_SNAPTOLEFT, G_BuildMapTitle(gamemap));
|
||||
|
||||
if (G_GametypeHasTeams())
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user