From: Samual Lenks Date: Sun, 25 Aug 2013 19:01:38 +0000 (-0400) Subject: We can rely on using gametype command for lsmaps update trigger X-Git-Tag: xonotic-v0.8.0~357^2~4 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8ced0314dc438d84e9d7e5e542027456fb8db759;p=xonotic%2Fxonotic-data.pk3dir.git We can rely on using gametype command for lsmaps update trigger --- diff --git a/qcsrc/server/command/sv_cmd.qc b/qcsrc/server/command/sv_cmd.qc index ba9b48a29..b336d3ee2 100644 --- a/qcsrc/server/command/sv_cmd.qc +++ b/qcsrc/server/command/sv_cmd.qc @@ -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"); diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 2f83973fa..56200fe35 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -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");