r3260 - trunk/data/qcsrc/common

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Thu Jan 24 16:23:05 EST 2008


Author: div0
Date: 2008-01-24 16:23:05 -0500 (Thu, 24 Jan 2008)
New Revision: 3260

Modified:
   trunk/data/qcsrc/common/mapinfo.qc
Log:
fix bug in mapinfo cache that made it not do anything at all


Modified: trunk/data/qcsrc/common/mapinfo.qc
===================================================================
--- trunk/data/qcsrc/common/mapinfo.qc	2008-01-24 21:12:43 UTC (rev 3259)
+++ trunk/data/qcsrc/common/mapinfo.qc	2008-01-24 21:23:05 UTC (rev 3260)
@@ -123,7 +123,10 @@
 
 	s = db_get(_MapInfo_Cache_DB_NameToIndex, MapInfo_Map_bspname);
 	if(!s) // empty string is NOT valid here!
+	{
 		i = buf_getsize(_MapInfo_Cache_Buf_IndexToMapData);
+		db_put(_MapInfo_Cache_DB_NameToIndex, MapInfo_Map_bspname, ftos(i));
+	}
 	else
 		i = stof(s);
 
@@ -259,12 +262,8 @@
 
 float MapInfo_Get_ByID(float i)
 {
-	// TODO check cache
 	if(MapInfo_Get_ByName(MapInfo_BSPName_ByID(i), 0, 0))
-	{
-		// TODO save in cache
 		return 1;
-	}
 	return 0;
 }
 




More information about the nexuiz-commits mailing list