[nexuiz-commits] r6922 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Mon Jun 8 13:22:47 EDT 2009


Author: div0
Date: 2009-06-08 13:22:47 -0400 (Mon, 08 Jun 2009)
New Revision: 6922

Modified:
   trunk/data/qcsrc/server/cl_player.qc
Log:
tuba: more blood out of ears; work around pain animation bug with clones


Modified: trunk/data/qcsrc/server/cl_player.qc
===================================================================
--- trunk/data/qcsrc/server/cl_player.qc	2009-06-08 17:10:09 UTC (rev 6921)
+++ trunk/data/qcsrc/server/cl_player.qc	2009-06-08 17:22:47 UTC (rev 6922)
@@ -337,11 +337,12 @@
 	if(DEATH_ISWEAPON(deathtype, WEP_TUBA))
 	{
 		// tuba causes blood to come out of the ears
+		print(ftos(self.health), "\n");
 		vector ear1, ear2;
 		vector d;
 		float f;
 		ear1 = self.origin;
-		ear1_z += 0.25 * self.view_ofs_z + 0.75 * self.maxs_z; // middle of headshot bbox
+		ear1_z += 0.125 * self.view_ofs_z + 0.875 * self.maxs_z; // 7/8
 		ear2 = ear1;
 		makevectors(self.angles);
 		ear1 += v_right * -10;
@@ -349,8 +350,8 @@
 		d = inflictor.origin - self.origin;
 		f = (d * v_right) / vlen(d); // this is cos of angle of d and v_right!
 		force = v_right * vlen(force);
-		Violence_GibSplash_At(ear1, force * -1, 2, bound(0, damage, 200) / 16 * (0.5 - 0.5 * f));
-		Violence_GibSplash_At(ear2, force,      2, bound(0, damage, 200) / 16 * (0.5 + 0.5 * f));
+		Violence_GibSplash_At(ear1, force * -1, 2, bound(0, damage, 25) / 2 * (0.5 - 0.5 * f));
+		Violence_GibSplash_At(ear2, force,      2, bound(0, damage, 25) / 2 * (0.5 + 0.5 * f));
 		if(f > 0)
 		{
 			hitloc = ear1;
@@ -406,10 +407,13 @@
 				self.pain_finished = time + 0.5;	//Supajoe
 
 				if(sv_gentle < 1) {		
-					if (random() > 0.5)
-						setanim(self, self.anim_pain1, FALSE, TRUE, TRUE);
-					else
-						setanim(self, self.anim_pain2, FALSE, TRUE, TRUE);
+					if(self.classname != "body") // pain anim is BORKED on our ZYMs, FIXME remove this once we have good models
+					{
+						if (random() > 0.5)
+							setanim(self, self.anim_pain1, FALSE, TRUE, TRUE);
+						else
+							setanim(self, self.anim_pain2, FALSE, TRUE, TRUE);
+					}
 
 					if(!DEATH_ISWEAPON(deathtype, WEP_LASER) || attacker != self || self.health < 2 * cvar("g_balance_laser_primary_damage") * cvar("g_balance_selfdamagepercent") + 1)
 					// exclude pain sounds for laserjumps as long as you aren't REALLY low on health and would die of the next two



More information about the nexuiz-commits mailing list