fokin zuff

This commit is contained in:
neon 2018-09-18 16:44:40 +02:00
parent 4dd6a78cb7
commit 8fad12df8d

View File

@ -2594,6 +2594,7 @@ stock int FindIntInArray(int[] array, int size, int value)
return -1;
}
stock void InternalRestoreMapCooldowns()
{
char sCooldownFile[PLATFORM_MAX_PATH];
@ -2632,7 +2633,7 @@ stock void InternalRestoreMapCooldowns()
return;
}
if((Cooldown = Cooldowns.GetNum("cd", -1)) > 0)
if((Cooldown = Cooldowns.GetNum("Cooldown", -1)) > 0)
{
LogMessage("Restored cooldown: %s -> %d", map, Cooldown);
g_OldMapList.SetValue(map, Cooldown, true);
@ -2654,31 +2655,6 @@ stock void InternalStoreMapCooldowns()
}
KeyValues Cooldowns = new KeyValues("mapchooser_extended");
if(!Cooldowns.ImportFromFile(sCooldownFile))
{
LogMessage("Unable to import cooldown file: \"%s\"", sCooldownFile);
delete Cooldowns;
return;
}
Cooldowns.Rewind();
if (Cooldowns.GotoFirstSubKey())
{
for (;;)
{
if (Cooldowns.DeleteThis() < 1)
break;
}
if(!Cooldowns.ExportToFile(sCooldownFile))
{
LogMessage("Unable to export cooldown file: \"%s\"", sCooldownFile);
delete Cooldowns;
return;
}
}
delete Cooldowns;
Cooldowns = new KeyValues("mapchooser_extended");
Cooldowns.Rewind();
int Cooldown;
char map[PLATFORM_MAX_PATH];
@ -2696,7 +2672,7 @@ stock void InternalStoreMapCooldowns()
delete OldMapListSnapshot;
return;
}
Cooldowns.SetNum("cd", Cooldown);
Cooldowns.SetNum("Cooldown", Cooldown);
Cooldowns.Rewind();
}