mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Incorporate few more instances of Z_Free NULL no-op
This commit is contained in:
parent
1ac2730ced
commit
93bd404072
2 changed files with 4 additions and 8 deletions
|
|
@ -110,15 +110,13 @@ void K_InitBossHealthBar(const char *enemyname, const char *subtitle, sfxenum_t
|
|||
{
|
||||
if (enemyname && enemyname[0])
|
||||
{
|
||||
if (bossinfo.enemyname)
|
||||
Z_Free(bossinfo.enemyname);
|
||||
Z_Free(bossinfo.enemyname);
|
||||
bossinfo.enemyname = Z_StrDup(enemyname);
|
||||
}
|
||||
|
||||
if (subtitle && subtitle[0])
|
||||
{
|
||||
if (bossinfo.subtitle)
|
||||
Z_Free(bossinfo.subtitle);
|
||||
Z_Free(bossinfo.subtitle);
|
||||
bossinfo.subtitle = Z_StrDup(subtitle);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4301,10 +4301,8 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate)
|
|||
// Reset some pesky boss state that can't be handled elsewhere.
|
||||
bossinfo.barlen = BOSSHEALTHBARLEN;
|
||||
bossinfo.visualbar = 0;
|
||||
if (bossinfo.enemyname)
|
||||
Z_Free(bossinfo.enemyname);
|
||||
if (bossinfo.subtitle)
|
||||
Z_Free(bossinfo.subtitle);
|
||||
Z_Free(bossinfo.enemyname);
|
||||
Z_Free(bossinfo.subtitle);
|
||||
bossinfo.enemyname = bossinfo.subtitle = NULL;
|
||||
bossinfo.titleshow = 0;
|
||||
bossinfo.titlesound = sfx_typri1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue