diff --git a/mapchooser_extended/scripting/mapchooser_extended.sp b/mapchooser_extended/scripting/mapchooser_extended.sp index 0af06bbb..eb9ea5bf 100644 --- a/mapchooser_extended/scripting/mapchooser_extended.sp +++ b/mapchooser_extended/scripting/mapchooser_extended.sp @@ -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(); }