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

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri May 29 17:42:19 EDT 2009


Author: mrbougo
Date: 2009-05-29 17:42:19 -0400 (Fri, 29 May 2009)
New Revision: 6794

Modified:
   trunk/data/effectinfo.txt
   trunk/data/qcsrc/client/gibs.qc
   trunk/data/qcsrc/server/cl_player.qc
   trunk/data/qcsrc/server/g_violence.qc
Log:
More tweaks to the blood color, simulate te_bloodshower to avoid black blood. Everything should be fine now.

Modified: trunk/data/effectinfo.txt
===================================================================
--- trunk/data/effectinfo.txt	2009-05-29 21:06:16 UTC (rev 6793)
+++ trunk/data/effectinfo.txt	2009-05-29 21:42:19 UTC (rev 6794)
@@ -741,7 +741,7 @@
 tex 24 32
 size 3 8
 alpha 256 256 64
-color 0x90FFFF 0x90FFFFF
+color 0xA8FFFF 0xA8FFFFF
 bounce -1
 airfriction 1
 liquidfriction 4
@@ -783,7 +783,7 @@
 effect TR_BLOOD
 trailspacing 16
 type blood
-color 0x90FFFF 0x90FFFF
+color 0xA8FFFF 0xA8FFFF
 tex 24 32
 size 8 8
 alpha 384 384 192
@@ -800,7 +800,7 @@
 effect TR_SLIGHTBLOOD
 trailspacing 32
 type blood
-color 0x90FFFF 0x90FFFF
+color 0xA8FFFF 0xA8FFFF
 tex 24 32
 size 8 8
 alpha 384 384 192
@@ -3272,7 +3272,7 @@
 tex 0 8
 size 25 30
 alpha 100 256 400
-color 0x000000 0x236432
+color 0x000000 0x204010
 originjitter 11 11 11
 
 effect robot_blood
@@ -3300,7 +3300,7 @@
 effect alien_TR_BLOOD
 trailspacing 16
 type blood
-color 0xDC9BCD 0xDC9BCD
+color 0xC080B0 0xC080B0
 tex 24 32
 size 8 8
 alpha 384 384 192
@@ -3313,7 +3313,7 @@
 effect robot_TR_BLOOD
 trailspacing 16
 type blood
-color 0xCDE69B 0xCDE69B
+color 0xC0D890 0xC0D890
 tex 24 32
 size 8 8
 alpha 384 384 192
@@ -3326,7 +3326,7 @@
 effect alien_TR_SLIGHTBLOOD
 trailspacing 32
 type blood
-color 0xDC9BCD 0xDC9BCD
+color 0xC080B0 0xC080B0
 tex 24 32
 size 80 80
 alpha 384 384 192
@@ -3339,7 +3339,7 @@
 effect robot_TR_SLIGHTBLOOD
 trailspacing 32
 type blood
-color 0xCDE69B 0xCDE69B
+color 0xC0D890 0xC0D890
 tex 24 32
 size 8 8
 alpha 384 384 192
@@ -3369,4 +3369,41 @@
 //originjitter 24 24 24
 velocityjitter 256 256 256
 
+effect bloodshower
+countabsolute 1
+type blood
+tex 24 32
+size 8 8
+color 0xA8FFFF 0xA8FFFFF
+alpha 256 256 64
+bounce -1
+airfriction 1
+liquidfriction 4
+velocityjitter 64 64 64
+velocitymultiplier 1
 
+effect alien_bloodshower
+countabsolute 1
+type blood
+tex 24 32
+size 8 8
+color 0xC080B0 0xC080B0
+alpha 256 256 64
+bounce -1
+airfriction 1
+liquidfriction 4
+velocityjitter 64 64 64
+velocitymultiplier 1
+
+effect robot_bloodshower
+countabsolute 1
+type blood
+tex 24 32
+size 8 8
+color 0xC0D890 0xC0D890
+alpha 256 256 64
+bounce -1
+airfriction 1
+liquidfriction 4
+velocityjitter 64 64 64
+velocitymultiplier 1

Modified: trunk/data/qcsrc/client/gibs.qc
===================================================================
--- trunk/data/qcsrc/client/gibs.qc	2009-05-29 21:06:16 UTC (rev 6793)
+++ trunk/data/qcsrc/client/gibs.qc	2009-05-29 21:42:19 UTC (rev 6794)
@@ -12,6 +12,14 @@
 	}
 }
 
+void new_te_bloodshower (float ef, vector org, float explosionspeed, float howmany)
+{
+	float i, pmod;
+	pmod = cvar("cl_particles_quality");
+	for (i = 0; i < 250 * pmod; i++)
+		pointparticles(ef, org, randomvec() * explosionspeed, howmany / 250);
+}
+
 void SUB_RemoveOnNoImpact()
 {
 	if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)
@@ -93,7 +101,7 @@
 void Ent_GibSplash()
 {
 	float amount, type, specnum;
-	vector org, vel, mi, ma;
+	vector org, vel;
 	string specstr;
 
 	float c, gibfactor, randomvalue;
@@ -104,8 +112,6 @@
 	org_y = ReadShort() * 4 + 2;
 	org_z = ReadShort() * 4 + 2;
 	vel = decompressShortVector(ReadShort());
-	mi = decompressShortVector(ReadShort());
-	ma = decompressShortVector(ReadShort());
 
 	if(cvar("cl_gentle"))
 		type |= 0x80; // set gentle bit
@@ -132,7 +138,7 @@
 
 			if(prandom() < amount)
 				TossGib ("models/gibs/eye.md3", org, vel, prandomvec() * 150, specnum, 0);
-			te_bloodshower(org + mi, org + ma, 1200, 1000 * amount);
+			new_te_bloodshower(particleeffectnum(strcat(specstr, "bloodshower")), org, 1200, amount);
 			if(prandom() < amount)
 				TossGib ("models/gibs/bloodyskull.md3", org, vel, prandomvec() * 100, specnum, 0);
 

Modified: trunk/data/qcsrc/server/cl_player.qc
===================================================================
--- trunk/data/qcsrc/server/cl_player.qc	2009-05-29 21:06:16 UTC (rev 6793)
+++ trunk/data/qcsrc/server/cl_player.qc	2009-05-29 21:42:19 UTC (rev 6794)
@@ -275,7 +275,7 @@
 void PlayerCorpseDamage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
 {
 	local float take, save;
-	Violence_GibSplash_At(hitloc, '0 0 0', '0 0 0', force, 2, bound(0, damage, 200) / 16);
+	Violence_GibSplash_At(hitloc, force, 2, bound(0, damage, 200) / 16);
 
 	// damage resistance (ignore most of the damage from a bullet or similar)
 	damage = max(damage - 5, 1);
@@ -291,9 +291,9 @@
 		sound (self, CHAN_PROJECTILE, "misc/bodyimpact1.wav", VOL_BASE, ATTN_NORM);
 
 	if (take > 50)
-		Violence_GibSplash_At(hitloc, '0 0 0', '0 0 0', force * -0.1, 3, 1);
+		Violence_GibSplash_At(hitloc, force * -0.1, 3, 1);
 	if (take > 100)
-		Violence_GibSplash_At(hitloc, '0 0 0', '0 0 0', force * -0.2, 3, 1);
+		Violence_GibSplash_At(hitloc, force * -0.2, 3, 1);
 
 	if (!(self.flags & FL_GODMODE))
 	{
@@ -333,7 +333,7 @@
 			damage /= sqrt(bound(1.0, attacker.cvar_cl_handicap, 100.0));
 	}
 
-	Violence_GibSplash_At(hitloc, '0 0 0', '0 0 0', force, 2, bound(0, damage, 200) / 16);
+	Violence_GibSplash_At(hitloc, force, 2, bound(0, damage, 200) / 16);
 
 	if(g_arena)
 	if(numspawned < 2)
@@ -358,9 +358,9 @@
 		sound (self, CHAN_PROJECTILE, "misc/bodyimpact1.wav", VOL_BASE, ATTN_NORM); // FIXME possibly remove them?
 
 	if (take > 50)
-		Violence_GibSplash_At(hitloc, '0 0 0', '0 0 0', force * -0.1, 3, 1);
+		Violence_GibSplash_At(hitloc, force * -0.1, 3, 1);
 	if (take > 100)
-		Violence_GibSplash_At(hitloc, '0 0 0', '0 0 0', force * -0.2, 3, 1);
+		Violence_GibSplash_At(hitloc, force * -0.2, 3, 1);
 
 	if (time > self.spawnshieldtime)
 	{

Modified: trunk/data/qcsrc/server/g_violence.qc
===================================================================
--- trunk/data/qcsrc/server/g_violence.qc	2009-05-29 21:06:16 UTC (rev 6793)
+++ trunk/data/qcsrc/server/g_violence.qc	2009-05-29 21:42:19 UTC (rev 6794)
@@ -7,13 +7,11 @@
 	WriteShort(MSG_ENTITY, floor(self.origin_y / 4)); // not using a coord here, as gibs don't need this accuracy
 	WriteShort(MSG_ENTITY, floor(self.origin_z / 4)); // not using a coord here, as gibs don't need this accuracy
 	WriteShort(MSG_ENTITY, self.oldorigin_x); // acrually compressed velocity
-	WriteShort(MSG_ENTITY, self.oldorigin_y); // acrually compressed mins
-	WriteShort(MSG_ENTITY, self.oldorigin_z); // acrually compressed maxs
 	return TRUE;
 }
 
 // TODO maybe convert this to a TE?
-void Violence_GibSplash_At(vector org, vector mi, vector ma, vector dir, float type, float amount)
+void Violence_GibSplash_At(vector org, vector dir, float type, float amount)
 {
 	entity e;
 
@@ -25,17 +23,14 @@
 		e.state |= 0x80; // "force gentle" bit
 	e.state |= 8 * self.species; // gib type, ranges from 0 to 15
 	setorigin(e, org);
-	setsize(e, mi, ma);
 	e.velocity = dir;
 
 	e.oldorigin_x = compressShortVector(e.velocity);
-	e.oldorigin_y = compressShortVector(e.mins);
-	e.oldorigin_z = compressShortVector(e.maxs);
 
 	Net_LinkEntity(e, FALSE, 0.2, Violence_GibSplash_SendEntity);
 }
 
 void Violence_GibSplash(entity source, float type, float amount)
 {
-	Violence_GibSplash_At(source.origin + source.view_ofs, source.mins - source.view_ofs, source.maxs - source.view_ofs, source.velocity, type, amount);
+	Violence_GibSplash_At(source.origin + source.view_ofs, source.velocity, type, amount);
 }



More information about the nexuiz-commits mailing list