From 8ced0314dc438d84e9d7e5e542027456fb8db759 Mon Sep 17 00:00:00 2001 From: Samual Lenks Date: Sun, 25 Aug 2013 15:01:38 -0400 Subject: [PATCH] We can rely on using gametype command for lsmaps update trigger --- qcsrc/server/command/sv_cmd.qc | 5 +++++ qcsrc/server/g_world.qc | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) 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"); -- 2.39.2