]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
We can rely on using gametype command for lsmaps update trigger
authorSamual Lenks <samual@xonotic.org>
Sun, 25 Aug 2013 19:01:38 +0000 (15:01 -0400)
committerSamual Lenks <samual@xonotic.org>
Sun, 25 Aug 2013 19:01:38 +0000 (15:01 -0400)
qcsrc/server/command/sv_cmd.qc
qcsrc/server/g_world.qc

index ba9b48a294a7ea5f9bc4bbda9eff993f0c8168b2..b336d3ee26da2ee8758b89a0d1eeb464b7f43217 100644 (file)
@@ -736,7 +736,12 @@ void GameCommand_gametype(float request, float argc)
                                        MapInfo_SwitchGameType(t);
                                        MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 0);
                                        if(MapInfo_count > 0)
+                                       {
+                                               // update lsmaps in case the gametype changed, this way people can easily list maps for it
+                                               if(lsmaps_reply != "") { strunzone(lsmaps_reply); }
+                                               lsmaps_reply = strzone(getlsmaps());
                                                bprint("Game type successfully switched to ", s, "\n");
+                                       }
                                        else
                                        {
                                                bprint("Cannot use this game type: no map for it found\n");
index 2f83973fa958c4cab7ed89b944b6e237bd1a4804..56200fe354b23c5c4b8372a96801c6427085f3af 100644 (file)
@@ -1539,10 +1539,6 @@ void NextLevel()
        if(autocvar_g_campaign)
                CampaignPreIntermission();
 
-       // update lsmaps in case the gametype changed, this way people can easily list maps for it
-       if(lsmaps_reply != "") { strunzone(lsmaps_reply); }
-       lsmaps_reply = strzone(getlsmaps());
-
        MUTATOR_CALLHOOK(MatchEnd);
 
        localcmd("\nsv_hook_gameend\n");