[nexuiz-commits] r8314 - in trunk/data/qcsrc/server: . bot/havocbot

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sun Nov 22 14:09:57 EST 2009


Author: div0
Date: 2009-11-22 14:09:57 -0500 (Sun, 22 Nov 2009)
New Revision: 8314

Modified:
   trunk/data/qcsrc/server/bot/havocbot/havocbot.qc
   trunk/data/qcsrc/server/g_damage.qc
   trunk/data/qcsrc/server/t_teleporters.qc
Log:
tuba: make it less of a BW hog
bot scripting: personal teleporter waypoint fixes


Modified: trunk/data/qcsrc/server/bot/havocbot/havocbot.qc
===================================================================
--- trunk/data/qcsrc/server/bot/havocbot/havocbot.qc	2009-11-22 18:04:10 UTC (rev 8313)
+++ trunk/data/qcsrc/server/bot/havocbot/havocbot.qc	2009-11-22 19:09:57 UTC (rev 8314)
@@ -1289,9 +1289,13 @@
 		s = self;
 		o = other;
 		self = head;
-		other = s;
+		other = spawn();
+		other.absmin = pos;
+		other.absmax = pos;
+		other.dphitcontentsmask = self.dphitcontentsmask;
 		if(ExactTriggerHit())
 			wp.wpflags |= WAYPOINTFLAG_TELEPORT;
+		remove(other);
 		self = s;
 		other = o;
 	}

Modified: trunk/data/qcsrc/server/g_damage.qc
===================================================================
--- trunk/data/qcsrc/server/g_damage.qc	2009-11-22 18:04:10 UTC (rev 8313)
+++ trunk/data/qcsrc/server/g_damage.qc	2009-11-22 19:09:57 UTC (rev 8314)
@@ -1064,6 +1064,7 @@
 	total_damage_to_creatures = 0;
 
 	if(deathtype != (WEP_HOOK | HITTYPE_SECONDARY | HITTYPE_BOUNCE)) // only send gravity bomb damage once
+	if(DEATH_WEAPONOF(deathtype) != WEP_TUBA) // do not send tuba damage (bandwidth hog)
 	{
 		force = inflictor.velocity;
 		if(vlen(force) == 0)

Modified: trunk/data/qcsrc/server/t_teleporters.qc
===================================================================
--- trunk/data/qcsrc/server/t_teleporters.qc	2009-11-22 18:04:10 UTC (rev 8313)
+++ trunk/data/qcsrc/server/t_teleporters.qc	2009-11-22 19:09:57 UTC (rev 8314)
@@ -155,8 +155,6 @@
 	if(other.classname == "player")
 		RemoveGrapplingHook(other);
 	
-	o = e.origin + '0 0 1' * (1 - other.mins_z - 24);
-
 	if(self.enemy)
 	{
 		e = self.enemy;
@@ -168,8 +166,11 @@
 		{
 			p = 1;
 			if(cvar("g_telefrag_avoid"))
+			{
+				o = e.origin + '0 0 1' * (1 - other.mins_z - 24);
 				if(check_tdeath(other, o, '0 0 0', '0 0 0'))
 					p = 0;
+			}
 			if(e.cnt)
 				RandomSelection_Add(e, 0, string_null, e.cnt, p);
 			else
@@ -187,6 +188,7 @@
 		if(vlen(other.velocity) > e.speed)
 			other.velocity = normalize(other.velocity) * max(0, e.speed);
 
+	o = e.origin + '0 0 1' * (1 - other.mins_z - 24);
 	TeleportPlayer(self, other, o, e.mangle, v_forward * vlen(other.velocity), '0 0 0', '0 0 0');
 
 	if(e.target)



More information about the nexuiz-commits mailing list