From 56a4bbd201638f2ce20656f412e2c1d3d03438b1 Mon Sep 17 00:00:00 2001 From: div0 Date: Thu, 31 Dec 2009 08:13:50 +0000 Subject: [PATCH] improve fallback code git-svn-id: svn://svn.icculus.org/nexuiz/trunk@8465 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/qcsrc/common/mapinfo.qc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/data/qcsrc/common/mapinfo.qc b/data/qcsrc/common/mapinfo.qc index 5a1974af1..ae07214e7 100644 --- a/data/qcsrc/common/mapinfo.qc +++ b/data/qcsrc/common/mapinfo.qc @@ -994,11 +994,12 @@ void MapInfo_SwitchGameType(float t) void MapInfo_LoadMap(string s) { MapInfo_Map_supportedGametypes = 0; - if(!MapInfo_CheckMap(s)) - { - print("EMERGENCY: can't play the selected map in the given game mode. Falling back to DM.\n"); - MapInfo_SwitchGameType(MAPINFO_TYPE_DEATHMATCH); - } + // we shouldn't need this, as LoadMapSettings already fixes the gametype + //if(!MapInfo_CheckMap(s)) + //{ + // print("EMERGENCY: can't play the selected map in the given game mode. Falling back to DM.\n"); + // MapInfo_SwitchGameType(MAPINFO_TYPE_DEATHMATCH); + //} localcmd(strcat("\nsettemp_restore\nchangelevel ", s, "\n")); } @@ -1023,7 +1024,10 @@ void MapInfo_LoadMapSettings(string s) // to be called from worldspawn if(!_MapInfo_CheckMap(s)) // with underscore, it keeps temps { if(MapInfo_Map_supportedGametypes == 0) + { print("Mapinfo system is not functional at all. Assuming deathmatch.\n"); + MapInfo_Map_supportedGametypes = MAPINFO_TYPE_DEATHMATCH; + } t = 1; while(!(MapInfo_Map_supportedGametypes & 1)) -- 2.39.2