r3156 - in trunk/data: maps qcsrc/common qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Wed Jan 16 19:46:26 EST 2008
Author: div0
Date: 2008-01-16 19:46:26 -0500 (Wed, 16 Jan 2008)
New Revision: 3156
Modified:
trunk/data/maps/toxic.mapinfo
trunk/data/qcsrc/common/campaign_setup.qc
trunk/data/qcsrc/server/campaign.qc
Log:
fix bug in campaign setup that breaks TDM mode
Modified: trunk/data/maps/toxic.mapinfo
===================================================================
--- trunk/data/maps/toxic.mapinfo 2008-01-16 20:25:09 UTC (rev 3155)
+++ trunk/data/maps/toxic.mapinfo 2008-01-17 00:46:26 UTC (rev 3156)
@@ -5,6 +5,7 @@
_spawnpoints 10
has weapons
type dm 30 20
+type tdm 50 20 2
type dom 200 20
type rune 200 20
type lms 9 20
Modified: trunk/data/qcsrc/common/campaign_setup.qc
===================================================================
--- trunk/data/qcsrc/common/campaign_setup.qc 2008-01-16 20:25:09 UTC (rev 3155)
+++ trunk/data/qcsrc/common/campaign_setup.qc 2008-01-17 00:46:26 UTC (rev 3156)
@@ -1,6 +1,8 @@
void CampaignSetup(float n)
{
+#ifndef MAPINFO
localcmd("exec game_reset.cfg\n");
+#endif
localcmd("exec mutator_reset.cfg\n");
localcmd("set g_campaign 1\n");
localcmd("set _campaign_name \"");
@@ -13,6 +15,7 @@
localcmd("\n");
#ifdef MAPINFO
MapInfo_SwitchGameType(MapInfo_Type_FromString(campaign_gametype[n]));
+ //print(">>", cvar_string("g_tdm"), "<<\n");
MapInfo_LoadMap(campaign_mapname[n]);
#else
localcmd("exec maps/"); // can't use strcat here in current fteqcc
Modified: trunk/data/qcsrc/server/campaign.qc
===================================================================
--- trunk/data/qcsrc/server/campaign.qc 2008-01-16 20:25:09 UTC (rev 3155)
+++ trunk/data/qcsrc/server/campaign.qc 2008-01-17 00:46:26 UTC (rev 3156)
@@ -49,10 +49,13 @@
// now some sanity checks
string thismapname, wantedmapname;
thismapname = GetMapname();
+ wantedmapname = campaign_gametype[0];
#ifdef MAPINFO
+ // TODO check game type
+ if(MapInfo_CurrentGametype() != MapInfo_Type_FromString(wantedmapname))
+ return CampaignBailout("wrong game type!");
wantedmapname = campaign_mapname[0];
#else
- wantedmapname = campaign_gametype[0];
wantedmapname = strcat(wantedmapname, "_", campaign_mapname[0]);
#endif
if(wantedmapname != thismapname)
More information about the nexuiz-commits
mailing list