r3113 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sun Jan 6 07:45:59 EST 2008


Author: esteel
Date: 2008-01-06 07:45:58 -0500 (Sun, 06 Jan 2008)
New Revision: 3113

Modified:
   trunk/data/qcsrc/server/w_shotgun.qc
Log:
secondary shotgun mode now also has a muzzleflash


Modified: trunk/data/qcsrc/server/w_shotgun.qc
===================================================================
--- trunk/data/qcsrc/server/w_shotgun.qc	2008-01-06 00:12:58 UTC (rev 3112)
+++ trunk/data/qcsrc/server/w_shotgun.qc	2008-01-06 12:45:58 UTC (rev 3113)
@@ -50,6 +50,7 @@
 	float	d;
 	float	f;
 	float	spread;
+	local entity flash;
 
 	bullets = cvar("g_balance_shotgun_secondary_bullets");
 	d = cvar("g_balance_shotgun_secondary_damage");
@@ -68,6 +69,20 @@
 	// casing code
 	if (cvar("g_casings") >= 1)
 		SpawnCasing (w_shotorg, ((random () * 50 + 50) * v_right) - ((random () * 25 + 25) * v_forward) - ((random () * 5 - 30) * v_up), 2, vectoangles(v_forward),'0 250 0', 100, 1);
+
+	flash = spawn();
+	setorigin(flash, '53 5 0');
+	setmodel(flash, "models/uziflash.md3"); // precision set below
+	setattachment(flash, self.weaponentity, "bone01");
+	flash.owner = self;
+	flash.viewmodelforclient = self;
+	flash.customizeentityforclient = CL_Weaponentity_CustomizeEntityForClient;
+	flash.scale = 1.2;
+	flash.think = SUB_Remove;
+	flash.nextthink = time + 0.06;
+	flash.angles_z = flash.v_angle_z + random() * 180;
+	flash.alpha = 1;
+	flash.effects = EF_ADDITIVE | EF_FULLBRIGHT | EF_LOWPRECISION;
 }
 
 // weapon frames




More information about the nexuiz-commits mailing list