コード例 #1
0
        protected virtual void VoteAndMoveToNextMap()
        {
            Picker.AddRecentMap(Map.MapName);
            if (RoundsLeft == 0)
            {
                return;
            }

            string map = Picker.ChooseNextLevel(this);

            if (!Running)
            {
                return;
            }

            if (map == null || map.CaselessEq(Map.MapName))
            {
                ContinueOnSameMap(); return;
            }

            AnnounceMapChange(map);
            Level lastMap = Map; LastMap = Map.MapName;

            if (!SetMap(map))
            {
                Map.Message("&WFailed to change map to " + map);
                ContinueOnSameMap();
            }
            else
            {
                TransferPlayers(lastMap);
                lastMap.Unload(true);
            }
        }
コード例 #2
0
        protected virtual void VoteAndMoveToNextMap()
        {
            Picker.AddRecentMap(Map.MapName);
            if (RoundsLeft == 0)
            {
                return;
            }

            string map = Picker.ChooseNextLevel(this);

            if (!Running)
            {
                return;
            }
            if (map == null)
            {
                ContinueOnSameMap(); return;
            }

            Map.Message("The next map has been chosen - &c" + map);
            Map.Message("Please wait while you are transfered.");
            Level lastMap = Map; LastMap = Map.MapName;

            if (!SetMap(map))
            {
                Map.Message("%WFailed to change map to " + map);
                ContinueOnSameMap();
            }
            else
            {
                TransferPlayers(lastMap);
                lastMap.Unload();
            }
        }