[nexuiz-commits] r7868 - in trunk/data: . qcsrc/client qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Wed Sep 23 02:12:41 EDT 2009


Author: div0
Date: 2009-09-23 02:12:41 -0400 (Wed, 23 Sep 2009)
New Revision: 7868

Modified:
   trunk/data/effectinfo.txt
   trunk/data/qcsrc/client/projectile.qc
   trunk/data/qcsrc/server/w_common.qc
Log:
better visuals for the rifle


Modified: trunk/data/effectinfo.txt
===================================================================
--- trunk/data/effectinfo.txt	2009-09-23 05:58:57 UTC (rev 7867)
+++ trunk/data/effectinfo.txt	2009-09-23 06:12:41 UTC (rev 7868)
@@ -4415,3 +4415,39 @@
 lightradius 200
 lightradiusfade 10000
 lightcolor 0.9 0.9 0.2
+
+// rifle bullet trail (somewhat like a tracer)
+// used in qcsrc/server/w_common.qc:				zcurveparticles_from_tracetoss(particleeffectnum("tr_bullet"), self.origin, trace_endpos, self.velocity)
+// used in qcsrc/client/projectile.qc:			trailparticles(self, particleeffectnum("tr_bullet"), from, to)
+effect tr_rifle
+trailspacing 128
+type spark
+color 0x800000 0xFF8020
+alpha 256 256 2560
+size 3 3
+stretchfactor 0.6
+velocitymultiplier 0.7
+effect tr_rifle
+notunderwater
+tex 0 8
+trailspacing 2
+type static
+color 0x202020 0x404040
+size 2 2
+sizeincrease 2
+alpha 256 256 512
+airfriction -4
+velocityjitter 4 4 4
+type smoke
+effect tr_rifle
+underwater
+trailspacing 8
+type bubble
+tex 62 62
+color 0x404040 0x808080
+size 1 1
+alpha 256 256 256
+gravity -0.125
+bounce 1.5
+liquidfriction 4
+velocityjitter 16 16 16

Modified: trunk/data/qcsrc/client/projectile.qc
===================================================================
--- trunk/data/qcsrc/client/projectile.qc	2009-09-23 05:58:57 UTC (rev 7867)
+++ trunk/data/qcsrc/client/projectile.qc	2009-09-23 06:12:41 UTC (rev 7868)
@@ -78,9 +78,11 @@
 			trailparticles(self, particleeffectnum("TR_GRENADE"), from, to);
 			break;
 		case PROJECTILE_BULLET:
-		case PROJECTILE_BULLET_GLOWING:
 			trailparticles(self, particleeffectnum("tr_bullet"), from, to);
 			break;
+		case PROJECTILE_BULLET_GLOWING:
+			trailparticles(self, particleeffectnum("tr_rifle"), from, to);
+			break;
 		case PROJECTILE_FIREMINE:
 			trailparticles(self, particleeffectnum("firemine"), from, to);
 			break;
@@ -172,9 +174,11 @@
 
 	switch(self.cnt)
 	{
+		/*
 		case PROJECTILE_BULLET_GLOWING:
 			R_AddDynamicLight(self.origin, 50, '1 1 0');
 			break;
+		*/
 		default:
 			break;
 	}

Modified: trunk/data/qcsrc/server/w_common.qc
===================================================================
--- trunk/data/qcsrc/server/w_common.qc	2009-09-23 05:58:57 UTC (rev 7867)
+++ trunk/data/qcsrc/server/w_common.qc	2009-09-23 06:12:41 UTC (rev 7868)
@@ -396,6 +396,13 @@
 	if(cvar("g_antilag_bullets"))
 	if(pSpeed >= cvar("g_antilag_bullets"))
 	{
+		float eff;
+
+		if(tracereffects & EF_RED)
+			eff = particleeffectnum("tr_rifle");
+		else
+			eff = particleeffectnum("tr_bullet");
+
 		// NOTE: this may severely throw off weapon balance
 		lag = ANTILAG_LATENCY(self);
 		if(lag < 0.001)
@@ -438,8 +445,8 @@
 				self.maxdamage_fired = self.weapon + 64 * rint(self.bullets_fired[self.weapon]);
 			}
 
-			if(vlen(trace_endpos - self.origin) > 32)
-				zcurveparticles_from_tracetoss(particleeffectnum("tr_bullet"), self.origin, trace_endpos, self.velocity);
+			if(vlen(trace_endpos - self.origin) > 16)
+				zcurveparticles_from_tracetoss(eff, self.origin, trace_endpos, self.velocity);
 			if(trace_fraction == 1)
 				break;
 				// won't hit anything anytime soon (DP's



More information about the nexuiz-commits mailing list