r3605 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Thu May 1 14:26:51 EDT 2008


Author: div0
Date: 2008-05-01 14:26:51 -0400 (Thu, 01 May 2008)
New Revision: 3605

Modified:
   trunk/data/qcsrc/server/w_common.qc
   trunk/data/qcsrc/server/w_nex.qc
Log:
fix code bug that may cause Yoda to "remove" the Nex beam, and that may cause the Nex beam end explosion to randomly not appear. May or may not fix the issue Green reported.


Modified: trunk/data/qcsrc/server/w_common.qc
===================================================================
--- trunk/data/qcsrc/server/w_common.qc	2008-05-01 17:49:31 UTC (rev 3604)
+++ trunk/data/qcsrc/server/w_common.qc	2008-05-01 18:26:51 UTC (rev 3605)
@@ -25,7 +25,8 @@
 void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, float deathtype)
 {
 	local vector hitloc, force, endpoint, dir;
-	local entity ent;
+	local entity ent, endent;
+	local float endq3surfaceflags;
 	//local entity explosion;
 
 	dir = normalize(end - start);
@@ -62,6 +63,8 @@
 	}
 
 	endpoint = trace_endpos;
+	endent = trace_ent;
+	endq3surfaceflags = trace_dphitq3surfaceflags;
 
 	// find all the entities the railgun hit and restore their solid state
 	ent = findfloat(world, railgunhit, TRUE);
@@ -101,6 +104,8 @@
 	//remove(explosion);
 
 	trace_endpos = endpoint;
+	trace_ent = endent;
+	trace_dphitq3surfaceflags = endq3surfaceflags;
 }
 
 void fireBullet (vector start, vector dir, float spread, float damage, float force, float dtype, float tracer)

Modified: trunk/data/qcsrc/server/w_nex.qc
===================================================================
--- trunk/data/qcsrc/server/w_nex.qc	2008-05-01 17:49:31 UTC (rev 3604)
+++ trunk/data/qcsrc/server/w_nex.qc	2008-05-01 18:26:51 UTC (rev 3605)
@@ -1,6 +1,10 @@
 
 void W_Nex_Attack (void)
 {
+	float flying;
+	if not(g_minstagib || g_instagib)
+		flying = IsFlying(self); // do this BEFORE to make the trace values from FireRailgunBullet last
+
 	W_SetupShot (self, '25 4 -4', TRUE, 5, "weapons/nexfire.wav");
 	//W_SetupShot (self, '25 8 -8', TRUE, 2, "weapons/nexfire.wav"); // TODO: move model down a little
 
@@ -11,8 +15,9 @@
 	{
 		yoda = 0;
 		FireRailgunBullet (w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, cvar("g_balance_nex_damage"), cvar("g_balance_nex_force"), IT_NEX);
+
 		if(yoda)
-			if(IsFlying(self))
+			if(flying)
 				announce(self, "announcer/male/yoda.ogg");
 	}
 




More information about the nexuiz-commits mailing list