r2164 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Feb 6 09:15:22 EST 2007


Author: lordhavoc
Date: 2007-02-06 09:15:22 -0500 (Tue, 06 Feb 2007)
New Revision: 2164

Modified:
   trunk/data/qcsrc/server/t_items.qc
Log:
changed item positioning code to work better


Modified: trunk/data/qcsrc/server/t_items.qc
===================================================================
--- trunk/data/qcsrc/server/t_items.qc	2007-02-06 14:07:40 UTC (rev 2163)
+++ trunk/data/qcsrc/server/t_items.qc	2007-02-06 14:15:22 UTC (rev 2164)
@@ -231,14 +231,6 @@
 
 	if (self.classname != "droppedweapon")
 	{
-		if (!self.noalign)
-		{
-			// first nudge it off the floor a little bit to avoid math errors
-			setorigin(self, self.origin + '0 0 1');
-			// note droptofloor returns FALSE if stuck/or would fall too far
-			droptofloor();
-		}
-
 		if(cvar("spawn_debug") >= 2)
 		{
 			entity otheritem;
@@ -328,19 +320,12 @@
 	self.solid = SOLID_TRIGGER;
 	self.touch = Item_Touch;
 	setmodel (self, self.mdl);
+	setsize (self, '-16 -16 0', '16 16 32');
 	if (itemflags & FL_WEAPON)
 	{
-		setorigin (self, self.origin + '0 0 23');
-		setsize (self, '-12 -12 -12', '12 12 12');
-
 		// neutral team color for pickup weapons
 		self.colormap = 160 * 1024 + 160;
 	}
-	else
-	{
-		setorigin (self, self.origin + '0 0 25');
-	//	setsize (self, '-8 -8 -5', '8 8 8');
-	}
 
 	// Savage: remove thrown items after a certain period of time ("garbage collection")
 	if (self.classname == "droppedweapon")
@@ -348,6 +333,13 @@
 		self.think = RemoveItem;
 		self.nextthink = time + 60;
 	}
+	else if (!self.noalign)
+	{
+		// first nudge it off the floor a little bit to avoid math errors
+		setorigin(self, self.origin + '0 0 1');
+		// note droptofloor returns FALSE if stuck/or would fall too far
+		droptofloor();
+	}
 
 	if (cvar("g_fullbrightitems"))
 		self.effects = self.effects | EF_FULLBRIGHT;




More information about the nexuiz-commits mailing list