This commit is contained in:
zaCade 2018-09-18 16:47:47 +02:00
parent 8fad12df8d
commit db13adc4aa

View File

@ -2624,6 +2624,7 @@ stock void InternalRestoreMapCooldowns()
int Cooldown;
char map[PLATFORM_MAX_PATH];
do
{
if(!Cooldowns.GetSectionName(map, sizeof(map)))
@ -2655,7 +2656,7 @@ stock void InternalStoreMapCooldowns()
}
KeyValues Cooldowns = new KeyValues("mapchooser_extended");
Cooldowns.Rewind();
int Cooldown;
char map[PLATFORM_MAX_PATH];
@ -2668,10 +2669,11 @@ stock void InternalStoreMapCooldowns()
if (!Cooldowns.JumpToKey(map, true))
{
LogMessage("Unable to create/find key: %s", map);
delete Cooldowns;
delete OldMapListSnapshot;
delete Cooldowns;
return;
}
Cooldowns.SetNum("Cooldown", Cooldown);
Cooldowns.Rewind();
}
@ -2679,11 +2681,11 @@ stock void InternalStoreMapCooldowns()
if(!Cooldowns.ExportToFile(sCooldownFile))
{
LogMessage("Unable to export cooldown file: \"%s\"", sCooldownFile);
delete Cooldowns;
delete OldMapListSnapshot;
delete Cooldowns;
return;
}
delete Cooldowns;
delete OldMapListSnapshot;
delete Cooldowns;
}