[nexuiz-commits] r7723 - in trunk/data/qcsrc/server: . tturrets/units

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Sep 11 04:16:03 EDT 2009


Author: div0
Date: 2009-09-11 04:15:50 -0400 (Fri, 11 Sep 2009)
New Revision: 7723

Modified:
   trunk/data/qcsrc/server/tturrets/units/unit_machinegun.qc
   trunk/data/qcsrc/server/tturrets/units/unit_walker.qc
   trunk/data/qcsrc/server/w_campingrifle.qc
   trunk/data/qcsrc/server/w_common.qc
   trunk/data/qcsrc/server/w_shotgun.qc
   trunk/data/qcsrc/server/w_uzi.qc
Log:
fix ballistic bullet compression


Modified: trunk/data/qcsrc/server/tturrets/units/unit_machinegun.qc
===================================================================
--- trunk/data/qcsrc/server/tturrets/units/unit_machinegun.qc	2009-09-11 07:43:56 UTC (rev 7722)
+++ trunk/data/qcsrc/server/tturrets/units/unit_machinegun.qc	2009-09-11 08:15:50 UTC (rev 7723)
@@ -10,6 +10,7 @@
 
     sound (self, CHAN_WEAPON, "weapons/uzi_fire.wav", VOL_BASE, ATTN_NORM);
     fireBallisticBullet (self.tur_shotorg, self.tur_shotdir_updated,self.shot_spread, self.shot_speed, 5, self.shot_dmg, 0, self.shot_force, DEATH_TURRET, 0, 1, cvar("g_balance_uzi_bulletconstant"));
+    endFireBallisticBullet();
 
     //w_deathtypestring = "had an alergic reaction due to 10 kilos of led";
     te_smallflash(self.tur_shotorg);

Modified: trunk/data/qcsrc/server/tturrets/units/unit_walker.qc
===================================================================
--- trunk/data/qcsrc/server/tturrets/units/unit_walker.qc	2009-09-11 07:43:56 UTC (rev 7722)
+++ trunk/data/qcsrc/server/tturrets/units/unit_walker.qc	2009-09-11 08:15:50 UTC (rev 7723)
@@ -836,6 +836,7 @@
     //w_deathtypestring = "was miniguned";
     sound (self, CHAN_WEAPON, "weapons/uzi_fire.wav", VOL_BASE, ATTN_NORM);
     fireBallisticBullet (self.tur_shotorg, self.tur_shotdir_updated,self.shot_spread, self.shot_speed, 5, self.shot_dmg, 0, self.shot_force, DEATH_TURRET, 0, 1, cvar("g_balance_uzi_bulletconstant"));
+    endFireBallisticBullet();
     if (self.uzi_bulletcounter == 2)
     {
 

Modified: trunk/data/qcsrc/server/w_campingrifle.qc
===================================================================
--- trunk/data/qcsrc/server/w_campingrifle.qc	2009-09-11 07:43:56 UTC (rev 7722)
+++ trunk/data/qcsrc/server/w_campingrifle.qc	2009-09-11 08:15:50 UTC (rev 7723)
@@ -83,6 +83,7 @@
 	}
 
 	fireBallisticBullet(w_shotorg, w_shotdir, pSpread, pSpeed, pLifetime, pDamage, pHeadshotAddedDamage / pDamage, pForce, deathtype, EF_RED, 1, pBulletConstant);
+	endFireBallisticBullet();
 
 	if (cvar("g_casings") >= 2)
 		SpawnCasing (((random () * 50 + 50) * v_right) - (v_forward * (random () * 25 + 25)) - ((random () * 5 - 70) * v_up), 2, vectoangles(v_forward),'0 250 0', 100, 3, self);

Modified: trunk/data/qcsrc/server/w_common.qc
===================================================================
--- trunk/data/qcsrc/server/w_common.qc	2009-09-11 07:43:56 UTC (rev 7722)
+++ trunk/data/qcsrc/server/w_common.qc	2009-09-11 08:15:50 UTC (rev 7723)
@@ -346,6 +346,10 @@
 	self.projectiledeathtype |= HITTYPE_BOUNCE;
 }
 
+void endFireBallisticBullet()
+{
+	endzcurveparticles();
+}
 void fireBallisticBullet(vector start, vector dir, float spread, float pSpeed, float lifetime, float damage, float headshotbonus, float force, float dtype, float tracereffects, float gravityfactor, float bulletconstant)
 {
 	float lag, dt, savetime;
@@ -465,8 +469,6 @@
 		frametime = savetime;
 		self = oldself;
 
-		endzcurveparticles();
-
 		if(lag)
 			FOR_EACH_PLAYER(pl)
 				antilag_restore(pl);

Modified: trunk/data/qcsrc/server/w_shotgun.qc
===================================================================
--- trunk/data/qcsrc/server/w_shotgun.qc	2009-09-11 07:43:56 UTC (rev 7722)
+++ trunk/data/qcsrc/server/w_shotgun.qc	2009-09-11 08:15:50 UTC (rev 7723)
@@ -22,6 +22,7 @@
 	W_SetupShot (self, cvar("g_antilag_bullets") && bulletspeed >= cvar("g_antilag_bullets"), 5, "weapons/shotgun_fire.wav", cvar("g_balance_shotgun_primary_damage"));
 	for (sc = 0;sc < bullets;sc = sc + 1)
 		fireBallisticBullet(w_shotorg, w_shotdir, spread, bulletspeed, 5, d, 0, f, WEP_SHOTGUN, 0, 1, bulletconstant);
+	endFireBallisticBullet();
 	if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
 		self.ammo_shells = self.ammo_shells - ammoamount;
 
@@ -65,6 +66,7 @@
 	W_SetupShot (self, cvar("g_antilag_bullets") && bulletspeed >= cvar("g_antilag_bullets"), 5, "weapons/shotgun_fire.wav", cvar("g_balance_shotgun_secondary_damage"));
 	for (sc = 0;sc < bullets;sc = sc + 1)
 		fireBallisticBullet(w_shotorg, w_shotdir, spread, bulletspeed, 5, d, 0, f, WEP_SHOTGUN | HITTYPE_SECONDARY, 0, 1, bulletconstant);
+	endFireBallisticBullet();
 	if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
 		self.ammo_shells = self.ammo_shells - ammoamount;
 

Modified: trunk/data/qcsrc/server/w_uzi.qc
===================================================================
--- trunk/data/qcsrc/server/w_uzi.qc	2009-09-11 07:43:56 UTC (rev 7722)
+++ trunk/data/qcsrc/server/w_uzi.qc	2009-09-11 08:15:50 UTC (rev 7723)
@@ -36,6 +36,7 @@
 		fireBallisticBullet(w_shotorg, w_shotdir, cvar("g_balance_uzi_first_spread"), cvar("g_balance_uzi_speed"), 5, cvar("g_balance_uzi_first_damage"), 0, cvar("g_balance_uzi_first_force"), deathtype, 0, 1, cvar("g_balance_uzi_bulletconstant"));
 	else
 		fireBallisticBullet(w_shotorg, w_shotdir, cvar("g_balance_uzi_sustained_spread"), cvar("g_balance_uzi_speed"), 5, cvar("g_balance_uzi_sustained_damage"), 0, cvar("g_balance_uzi_sustained_force"), deathtype, 0, 1, cvar("g_balance_uzi_bulletconstant"));
+	endFireBallisticBullet();
 
 	pointparticles(particleeffectnum("uzi_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
 



More information about the nexuiz-commits mailing list