diff --git a/mapvote/mapvote.gsc b/mapvote/mapvote.gsc index 342ec22..11a6ed8 100644 Binary files a/mapvote/mapvote.gsc and b/mapvote/mapvote.gsc differ diff --git a/mapvote/source/mapvote-source.gsc b/mapvote/source/mapvote-source.gsc index d2d7fc8..91c997b 100644 --- a/mapvote/source/mapvote-source.gsc +++ b/mapvote/source/mapvote-source.gsc @@ -20,7 +20,7 @@ Init() { if (GetDvarInt("mapvote_enable")) { - level.mapvote_rotate_function = ::DoRotation; + level.mapvote_rotate_function = ::StartRotation; InitMapvote(); } @@ -554,8 +554,7 @@ ListenForEndVote() Print("[MAPVOTE] Rotating to " + mapName + " | " + modeName + " (" + modeCfg + ".cfg)"); } - SetDvar("sv_maprotationcurrent", "exec " + modeCfg + ".cfg map " + mapName); - SetDvar("sv_maprotation", "exec " + modeCfg + ".cfg map " + mapName); + DoRotation(modeCfg, mapName); } SetMapvoteData(type) @@ -697,11 +696,16 @@ RotateDefault() mapName = GetMapCodeName(dataSplitted[0]); } + DoRotation(modeCfg, mapName); +} + +DoRotation(modeCfg, mapName) +{ SetDvar("sv_maprotationcurrent", "exec " + modeCfg + ".cfg map " + mapName); SetDvar("sv_maprotation", "exec " + modeCfg + ".cfg map " + mapName); } -DoRotation() +StartRotation() { if (ShouldRotateDefault()) {