r2053 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Mon Dec 18 03:41:32 EST 2006
Author: div0
Date: 2006-12-18 03:41:31 -0500 (Mon, 18 Dec 2006)
New Revision: 2053
Modified:
trunk/data/qcsrc/server/t_items.qc
Log:
spawn_debug 2 searches for duplicated items too
Modified: trunk/data/qcsrc/server/t_items.qc
===================================================================
--- trunk/data/qcsrc/server/t_items.qc 2006-12-17 21:38:27 UTC (rev 2052)
+++ trunk/data/qcsrc/server/t_items.qc 2006-12-18 08:41:31 UTC (rev 2053)
@@ -225,6 +225,7 @@
};
+.float is_item;
void StartItem (string itemmodel, string pickupsound, float defaultrespawntime, string itemname, float itemid, float itemflags, float(entity player, entity item) pickupevalfunc, float pickupbasevalue)
{
vector org;
@@ -255,6 +256,24 @@
setorigin(self, org);
}
+ if(cvar("spawn_debug") >= 2)
+ {
+ if(self.classname != "droppedweapon")
+ {
+ entity otheritem;
+ for(otheritem = findradius(org, 3); otheritem; otheritem = otheritem.chain)
+ {
+ if(otheritem.is_item)
+ {
+ dprint("XXX Found duplicated item: ", itemname, vtos(self.origin));
+ dprint(" vs ", otheritem.netname, vtos(otheritem.origin), "\n");
+ error("Mapper sucks.");
+ }
+ }
+ self.is_item = TRUE;
+ }
+ }
+
if (self.classname != "droppedweapon")
waypoint_spawnforitem(self);
More information about the nexuiz-commits
mailing list