r2976 - trunk/data/qcsrc/common
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sat Nov 17 03:20:29 EST 2007
Author: div0
Date: 2007-11-17 03:20:28 -0500 (Sat, 17 Nov 2007)
New Revision: 2976
Modified:
trunk/data/qcsrc/common/mapinfo.qc
trunk/data/qcsrc/common/mapinfo.qh
Log:
oops... forgot to commit this
Modified: trunk/data/qcsrc/common/mapinfo.qc
===================================================================
--- trunk/data/qcsrc/common/mapinfo.qc 2007-11-16 21:43:00 UTC (rev 2975)
+++ trunk/data/qcsrc/common/mapinfo.qc 2007-11-17 08:20:28 UTC (rev 2976)
@@ -88,7 +88,7 @@
return string_null; // BAIL OUT
if(MapInfo_Get_ByName(_MapInfo_GlobItem(m), 1, 0) == 2) // if we generated one... BAIL OUT and let the caller continue in the next frame.
return string_null; // BAIL OUT
- valid = ((MapInfo_Map_supportedGametypes & pGametype) != 0) && ((MapInfo_Map_supportedFeatures & pFeatures) == pFeatures);
+ valid = (((MapInfo_Map_supportedGametypes & pGametype) != 0) && ((MapInfo_Map_supportedFeatures & pFeatures) == pFeatures));
r = MapInfo_FilterGametype_Recursive(pGametype, pFeatures, m + 1, pEnd);
if not(r)
return string_null; // BAIL OUT
@@ -110,15 +110,21 @@
}
_MapInfo_filtered = strzone(_MapInfo_filtered);
MapInfo_count = HugeSetOfIntegers_length(_MapInfo_filtered);
+ print("Filter ", ftos(pGametype), "/", ftos(pFeatures), " has ", ftos(MapInfo_count), "\n");
// TODO clear cache
return 1;
}
// load info about the i-th map into the MapInfo_Map_* globals
+string MapInfo_BSPName_ByID(float i)
+{
+ return _MapInfo_GlobItem(HugeSetOfIntegers_get(_MapInfo_filtered, i));
+}
+
float MapInfo_Get_ByID(float i)
{
// TODO check cache
- if(MapInfo_Get_ByName(_MapInfo_GlobItem(HugeSetOfIntegers_get(_MapInfo_filtered, i)), 0, 0))
+ if(MapInfo_Get_ByName(MapInfo_BSPName_ByID(i), 0, 0))
{
// TODO save in cache
return 1;
@@ -444,6 +450,7 @@
req = 0;
if(!(cvar("g_instagib") || cvar("g_minstagib") || cvar("g_nixnex") || cvar("g_rocketarena")))
req |= MAPINFO_FEATURE_WEAPONS;
+ print(ftos(req), "\n");
return req;
}
Modified: trunk/data/qcsrc/common/mapinfo.qh
===================================================================
--- trunk/data/qcsrc/common/mapinfo.qh 2007-11-16 21:43:00 UTC (rev 2975)
+++ trunk/data/qcsrc/common/mapinfo.qh 2007-11-17 08:20:28 UTC (rev 2976)
@@ -35,6 +35,7 @@
// load info about the i-th map into the MapInfo_Map_* globals
float MapInfo_Get_ByID(float i); // 1 on success, 0 on failure
+string MapInfo_BSPName_ByID(float i);
// load info about a map by name into the MapInfo_Map_* globals
float MapInfo_Get_ByName(string s, float allowGenerate, float gametypeToSet); // 1 on success, 0 on failure, 2 if it autogenerated a mapinfo file
More information about the nexuiz-commits
mailing list