[nexuiz-commits] r6776 - in trunk/data: . models/gibs models/player particles qcsrc/client qcsrc/common qcsrc/menu/nexuiz qcsrc/server textures
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Tue May 26 08:54:25 EDT 2009
Author: mrbougo
Date: 2009-05-26 08:54:24 -0400 (Tue, 26 May 2009)
New Revision: 6776
Added:
trunk/data/models/gibs/arm.md3_0.skin
trunk/data/models/gibs/arm.md3_1.skin
trunk/data/models/gibs/arm.md3_2.skin
trunk/data/models/gibs/bloodyskull.md3_0.skin
trunk/data/models/gibs/bloodyskull.md3_1.skin
trunk/data/models/gibs/bloodyskull.md3_2.skin
trunk/data/models/gibs/chest.md3_0.skin
trunk/data/models/gibs/chest.md3_1.skin
trunk/data/models/gibs/chest.md3_2.skin
trunk/data/models/gibs/leg1.md3_0.skin
trunk/data/models/gibs/leg1.md3_1.skin
trunk/data/models/gibs/leg1.md3_2.skin
trunk/data/models/gibs/leg2.md3_0.skin
trunk/data/models/gibs/leg2.md3_1.skin
trunk/data/models/gibs/leg2.md3_2.skin
trunk/data/models/gibs/smallchest.md3_0.skin
trunk/data/models/gibs/smallchest.md3_1.skin
trunk/data/models/gibs/smallchest.md3_2.skin
trunk/data/textures/bloodyskull_alien.tga
trunk/data/textures/bloodyskull_alien_glow.tga
trunk/data/textures/bloodyskull_robot.tga
trunk/data/textures/bloodyskull_robot_gloss.tga
trunk/data/textures/bloodyskull_robot_glow.tga
trunk/data/textures/meat_alien.tga
trunk/data/textures/meat_alien_gloss.tga
trunk/data/textures/meat_alien_glow.tga
trunk/data/textures/meat_alien_norm.tga
trunk/data/textures/meat_robot.tga
trunk/data/textures/meat_robot_gloss.tga
trunk/data/textures/meat_robot_glow.tga
trunk/data/textures/meat_robot_norm.tga
Modified:
trunk/data/effectinfo.txt
trunk/data/models/player/carni.txt
trunk/data/models/player/carniarmor.txt
trunk/data/models/player/fricka.txt
trunk/data/models/player/grunt.txt
trunk/data/models/player/headhunter.txt
trunk/data/models/player/heroine.txt
trunk/data/models/player/insurrectionist.txt
trunk/data/models/player/lurk.txt
trunk/data/models/player/lycanthrope.txt
trunk/data/models/player/marine.txt
trunk/data/models/player/mulder.txt
trunk/data/models/player/nexus.txt
trunk/data/models/player/pyria.txt
trunk/data/models/player/quark.txt
trunk/data/models/player/reptile.txt
trunk/data/models/player/shock.txt
trunk/data/models/player/skadi.txt
trunk/data/models/player/specop.txt
trunk/data/models/player/xolar.txt
trunk/data/particles/particlefont.tga
trunk/data/qcsrc/client/gibs.qc
trunk/data/qcsrc/common/constants.qh
trunk/data/qcsrc/menu/nexuiz/playermodel.c
trunk/data/qcsrc/server/cl_client.qc
trunk/data/qcsrc/server/cl_player.qc
trunk/data/qcsrc/server/defs.qh
trunk/data/qcsrc/server/g_violence.qc
Log:
new gib types: alien and robot_shiny, and blood types, depending on playermodel
Modified: trunk/data/effectinfo.txt
===================================================================
--- trunk/data/effectinfo.txt 2009-05-26 10:38:00 UTC (rev 6775)
+++ trunk/data/effectinfo.txt 2009-05-26 12:54:24 UTC (rev 6776)
@@ -741,6 +741,7 @@
tex 24 32
size 3 8
alpha 256 256 64
+color 0xBEFFFF 0xBEFFFFF
bounce -1
airfriction 1
liquidfriction 4
@@ -782,7 +783,7 @@
effect TR_BLOOD
trailspacing 16
type blood
-color 0xFFFFFF 0xFFFFFF
+color 0xBEFFFF 0xBEFFFF
tex 24 32
size 8 8
alpha 384 384 192
@@ -799,7 +800,7 @@
effect TR_SLIGHTBLOOD
trailspacing 32
type blood
-color 0xFFFFFF 0xFFFFFF
+color 0xBEFFFF 0xBEFFFF
tex 24 32
size 8 8
alpha 384 384 192
@@ -3252,3 +3253,99 @@
tex 40 40
//lightradius 200
//lighttime 0
+
+effect alien_blood
+count 0.333
+type blood
+tex 24 32
+size 3 8
+alpha 256 256 64
+color 0xDC9BCD 0xDC9BCD
+bounce -1
+airfriction 1
+liquidfriction 4
+velocityjitter 64 64 64
+velocitymultiplier 5
+//blood mist
+effect alien_blood
+countabsolute 1
+type alphastatic
+tex 0 8
+size 25 30
+alpha 100 256 400
+color 0x000000 0x236432
+originjitter 11 11 11
+
+effect robot_blood
+count 0.333
+type blood
+tex 24 32
+size 3 8
+alpha 256 256 64
+bounce -1
+airfriction 1
+liquidfriction 4
+velocityjitter 64 64 64
+velocitymultiplier 5
+//blood mist
+effect robot_blood
+countabsolute 1
+type alphastatic
+tex 0 8
+size 25 30
+alpha 100 256 400
+color 0x000000 0x321964
+originjitter 11 11 11
+
+
+effect alien_TR_BLOOD
+trailspacing 16
+type blood
+color 0xDC9BCD 0xDC9BCD
+tex 24 32
+size 8 8
+alpha 384 384 192
+bounce -1
+airfriction 1
+liquidfriction 4
+velocityjitter 64 64 64
+velocitymultiplier 0.5
+
+effect robot_TR_BLOOD
+trailspacing 16
+type blood
+color 0xCDE69B 0xCDE69B
+tex 24 32
+size 8 8
+alpha 384 384 192
+bounce -1
+airfriction 1
+liquidfriction 4
+velocityjitter 64 64 64
+velocitymultiplier 0.5
+
+effect alien_TR_SLIGHTBLOOD
+trailspacing 32
+type blood
+color 0xDC9BCD 0xDC9BCD
+tex 24 32
+size 80 80
+alpha 384 384 192
+bounce -1
+airfriction 1
+liquidfriction 4
+velocityjitter 64 64 64
+velocitymultiplier 0.5
+
+effect robot_TR_SLIGHTBLOOD
+trailspacing 32
+type blood
+color 0xCDE69B 0xCDE69B
+tex 24 32
+size 8 8
+alpha 384 384 192
+bounce -1
+airfriction 1
+liquidfriction 4
+velocityjitter 64 64 64
+velocitymultiplier 0.5
Added: trunk/data/models/gibs/arm.md3_0.skin
===================================================================
--- trunk/data/models/gibs/arm.md3_0.skin (rev 0)
+++ trunk/data/models/gibs/arm.md3_0.skin 2009-05-26 12:54:24 UTC (rev 6776)
@@ -0,0 +1 @@
+Box03,textures/meat.tga
Cylinder11,textures/meat.tga
\ No newline at end of file
Added: trunk/data/models/gibs/arm.md3_1.skin
===================================================================
--- trunk/data/models/gibs/arm.md3_1.skin (rev 0)
+++ trunk/data/models/gibs/arm.md3_1.skin 2009-05-26 12:54:24 UTC (rev 6776)
@@ -0,0 +1 @@
+Box03,textures/meat_robot.tga
Cylinder11,textures/meat_robot.tga
\ No newline at end of file
Added: trunk/data/models/gibs/arm.md3_2.skin
===================================================================
--- trunk/data/models/gibs/arm.md3_2.skin (rev 0)
+++ trunk/data/models/gibs/arm.md3_2.skin 2009-05-26 12:54:24 UTC (rev 6776)
@@ -0,0 +1 @@
+Box03,textures/meat_alien.tga
Cylinder11,textures/meat_alien.tga
\ No newline at end of file
Added: trunk/data/models/gibs/bloodyskull.md3_0.skin
===================================================================
--- trunk/data/models/gibs/bloodyskull.md3_0.skin (rev 0)
+++ trunk/data/models/gibs/bloodyskull.md3_0.skin 2009-05-26 12:54:24 UTC (rev 6776)
@@ -0,0 +1 @@
+Box03,textures/bloodyskull.tga
\ No newline at end of file
Added: trunk/data/models/gibs/bloodyskull.md3_1.skin
===================================================================
--- trunk/data/models/gibs/bloodyskull.md3_1.skin (rev 0)
+++ trunk/data/models/gibs/bloodyskull.md3_1.skin 2009-05-26 12:54:24 UTC (rev 6776)
@@ -0,0 +1 @@
+Box03,textures/bloodyskull_robot.tga
\ No newline at end of file
Added: trunk/data/models/gibs/bloodyskull.md3_2.skin
===================================================================
--- trunk/data/models/gibs/bloodyskull.md3_2.skin (rev 0)
+++ trunk/data/models/gibs/bloodyskull.md3_2.skin 2009-05-26 12:54:24 UTC (rev 6776)
@@ -0,0 +1 @@
+Box03,textures/bloodyskull_alien.tga
\ No newline at end of file
Added: trunk/data/models/gibs/chest.md3_0.skin
===================================================================
--- trunk/data/models/gibs/chest.md3_0.skin (rev 0)
+++ trunk/data/models/gibs/chest.md3_0.skin 2009-05-26 12:54:24 UTC (rev 6776)
@@ -0,0 +1 @@
+Box02,textures/meat.tga
Cylinder06,textures/meat.tga
\ No newline at end of file
Added: trunk/data/models/gibs/chest.md3_1.skin
===================================================================
--- trunk/data/models/gibs/chest.md3_1.skin (rev 0)
+++ trunk/data/models/gibs/chest.md3_1.skin 2009-05-26 12:54:24 UTC (rev 6776)
@@ -0,0 +1 @@
+Box02,textures/meat_robot.tga
Cylinder06,textures/meat_robot.tga
\ No newline at end of file
Added: trunk/data/models/gibs/chest.md3_2.skin
===================================================================
--- trunk/data/models/gibs/chest.md3_2.skin (rev 0)
+++ trunk/data/models/gibs/chest.md3_2.skin 2009-05-26 12:54:24 UTC (rev 6776)
@@ -0,0 +1 @@
+Box02,textures/meat_alien.tga
Cylinder06,textures/meat_alien.tga
\ No newline at end of file
Added: trunk/data/models/gibs/leg1.md3_0.skin
===================================================================
--- trunk/data/models/gibs/leg1.md3_0.skin (rev 0)
+++ trunk/data/models/gibs/leg1.md3_0.skin 2009-05-26 12:54:24 UTC (rev 6776)
@@ -0,0 +1 @@
+legs,textures/meat.tga
\ No newline at end of file
Added: trunk/data/models/gibs/leg1.md3_1.skin
===================================================================
--- trunk/data/models/gibs/leg1.md3_1.skin (rev 0)
+++ trunk/data/models/gibs/leg1.md3_1.skin 2009-05-26 12:54:24 UTC (rev 6776)
@@ -0,0 +1 @@
+legs,textures/meat_robot.tga
\ No newline at end of file
Added: trunk/data/models/gibs/leg1.md3_2.skin
===================================================================
--- trunk/data/models/gibs/leg1.md3_2.skin (rev 0)
+++ trunk/data/models/gibs/leg1.md3_2.skin 2009-05-26 12:54:24 UTC (rev 6776)
@@ -0,0 +1 @@
+legs,textures/meat_alien.tga
\ No newline at end of file
Added: trunk/data/models/gibs/leg2.md3_0.skin
===================================================================
--- trunk/data/models/gibs/leg2.md3_0.skin (rev 0)
+++ trunk/data/models/gibs/leg2.md3_0.skin 2009-05-26 12:54:24 UTC (rev 6776)
@@ -0,0 +1 @@
+legs01,textures/meat.tga
\ No newline at end of file
Added: trunk/data/models/gibs/leg2.md3_1.skin
===================================================================
--- trunk/data/models/gibs/leg2.md3_1.skin (rev 0)
+++ trunk/data/models/gibs/leg2.md3_1.skin 2009-05-26 12:54:24 UTC (rev 6776)
@@ -0,0 +1 @@
+legs01,textures/meat_robot.tga
\ No newline at end of file
Added: trunk/data/models/gibs/leg2.md3_2.skin
===================================================================
--- trunk/data/models/gibs/leg2.md3_2.skin (rev 0)
+++ trunk/data/models/gibs/leg2.md3_2.skin 2009-05-26 12:54:24 UTC (rev 6776)
@@ -0,0 +1 @@
+legs01,textures/meat_alien.tga
\ No newline at end of file
Added: trunk/data/models/gibs/smallchest.md3_0.skin
===================================================================
--- trunk/data/models/gibs/smallchest.md3_0.skin (rev 0)
+++ trunk/data/models/gibs/smallchest.md3_0.skin 2009-05-26 12:54:24 UTC (rev 6776)
@@ -0,0 +1,5 @@
+Box01,textures/meat.tga
+Cylinder02,textures/meat.tga
+Cylinder13,textures/meat.tga
+Cylinder14,textures/meat.tga
+Cylinder15,textures/meat.tga
\ No newline at end of file
Added: trunk/data/models/gibs/smallchest.md3_1.skin
===================================================================
--- trunk/data/models/gibs/smallchest.md3_1.skin (rev 0)
+++ trunk/data/models/gibs/smallchest.md3_1.skin 2009-05-26 12:54:24 UTC (rev 6776)
@@ -0,0 +1,5 @@
+Box01,textures/meat_robot.tga
+Cylinder02,textures/meat_robot.tga
+Cylinder13,textures/meat_robot.tga
+Cylinder14,textures/meat_robot.tga
+Cylinder15,textures/meat_robot.tga
\ No newline at end of file
Added: trunk/data/models/gibs/smallchest.md3_2.skin
===================================================================
--- trunk/data/models/gibs/smallchest.md3_2.skin (rev 0)
+++ trunk/data/models/gibs/smallchest.md3_2.skin 2009-05-26 12:54:24 UTC (rev 6776)
@@ -0,0 +1,5 @@
+Box01,textures/meat_alien.tga
+Cylinder02,textures/meat_alien.tga
+Cylinder13,textures/meat_alien.tga
+Cylinder14,textures/meat_alien.tga
+Cylinder15,textures/meat_alien.tga
\ No newline at end of file
Modified: trunk/data/models/player/carni.txt
===================================================================
--- trunk/data/models/player/carni.txt 2009-05-26 10:38:00 UTC (rev 6775)
+++ trunk/data/models/player/carni.txt 2009-05-26 12:54:24 UTC (rev 6776)
@@ -2,9 +2,10 @@
models/player/carni
0
models/player/carni.zym
+species alien
Mutated Warrior
Sex: Male
Weight: 236 lb
-Age: 15
\ No newline at end of file
+Age: 15
Modified: trunk/data/models/player/carniarmor.txt
===================================================================
--- trunk/data/models/player/carniarmor.txt 2009-05-26 10:38:00 UTC (rev 6775)
+++ trunk/data/models/player/carniarmor.txt 2009-05-26 12:54:24 UTC (rev 6776)
@@ -2,6 +2,7 @@
models/player/carniarmor
1
models/player/carni.zym
+species alien
Mutated Warrior
Modified: trunk/data/models/player/fricka.txt
===================================================================
--- trunk/data/models/player/fricka.txt 2009-05-26 10:38:00 UTC (rev 6775)
+++ trunk/data/models/player/fricka.txt 2009-05-26 12:54:24 UTC (rev 6776)
@@ -2,9 +2,10 @@
models/player/fricka
1
models/player/visitant.zym
+species alien
Mutated Warrior
Sex: Female
Weight: 126 lb
-Age: 16
\ No newline at end of file
+Age: 16
Modified: trunk/data/models/player/grunt.txt
===================================================================
--- trunk/data/models/player/grunt.txt 2009-05-26 10:38:00 UTC (rev 6775)
+++ trunk/data/models/player/grunt.txt 2009-05-26 12:54:24 UTC (rev 6776)
@@ -2,6 +2,7 @@
models/player/grunt
0
models/player/grunt.zym
+species robot_shiny
Half Mechanical
Human Fighter
Modified: trunk/data/models/player/headhunter.txt
===================================================================
--- trunk/data/models/player/headhunter.txt 2009-05-26 10:38:00 UTC (rev 6775)
+++ trunk/data/models/player/headhunter.txt 2009-05-26 12:54:24 UTC (rev 6776)
@@ -2,6 +2,7 @@
models/player/headhunter
0
models/player/headhunter.zym
+species alien
Mutated Warrior
Modified: trunk/data/models/player/heroine.txt
===================================================================
--- trunk/data/models/player/heroine.txt 2009-05-26 10:38:00 UTC (rev 6775)
+++ trunk/data/models/player/heroine.txt 2009-05-26 12:54:24 UTC (rev 6776)
@@ -2,6 +2,7 @@
models/player/heroine
1
models/player/jeandarc.zym
+species human
Solo Fighter
Modified: trunk/data/models/player/insurrectionist.txt
===================================================================
--- trunk/data/models/player/insurrectionist.txt 2009-05-26 10:38:00 UTC (rev 6775)
+++ trunk/data/models/player/insurrectionist.txt 2009-05-26 12:54:24 UTC (rev 6776)
@@ -2,6 +2,7 @@
models/player/insurrectionist
0
models/player/insurrectionist.zym
+species human
Warrior
Modified: trunk/data/models/player/lurk.txt
===================================================================
--- trunk/data/models/player/lurk.txt 2009-05-26 10:38:00 UTC (rev 6775)
+++ trunk/data/models/player/lurk.txt 2009-05-26 12:54:24 UTC (rev 6776)
@@ -2,6 +2,7 @@
models/player/lurk
0
models/player/lurk.zym
+species alien
Reptilian Combatant
Modified: trunk/data/models/player/lycanthrope.txt
===================================================================
--- trunk/data/models/player/lycanthrope.txt 2009-05-26 10:38:00 UTC (rev 6775)
+++ trunk/data/models/player/lycanthrope.txt 2009-05-26 12:54:24 UTC (rev 6776)
@@ -2,6 +2,7 @@
models/player/lycanthrope
0
models/player/lycanthrope.zym
+species human
Monsterous Opponent
Modified: trunk/data/models/player/marine.txt
===================================================================
--- trunk/data/models/player/marine.txt 2009-05-26 10:38:00 UTC (rev 6775)
+++ trunk/data/models/player/marine.txt 2009-05-26 12:54:24 UTC (rev 6776)
@@ -2,6 +2,7 @@
models/player/marine
0
models/player/marine.zym
+species human
Service Man
Modified: trunk/data/models/player/mulder.txt
===================================================================
--- trunk/data/models/player/mulder.txt 2009-05-26 10:38:00 UTC (rev 6775)
+++ trunk/data/models/player/mulder.txt 2009-05-26 12:54:24 UTC (rev 6776)
@@ -2,6 +2,7 @@
models/player/mulder
1
models/player/nexus.zym
+species robot_shiny
Nexuiz's Soldier
Modified: trunk/data/models/player/nexus.txt
===================================================================
--- trunk/data/models/player/nexus.txt 2009-05-26 10:38:00 UTC (rev 6775)
+++ trunk/data/models/player/nexus.txt 2009-05-26 12:54:24 UTC (rev 6776)
@@ -2,6 +2,7 @@
models/player/nexus
0
models/player/nexus.zym
+species human
Nexuiz's Soldier
Modified: trunk/data/models/player/pyria.txt
===================================================================
--- trunk/data/models/player/pyria.txt 2009-05-26 10:38:00 UTC (rev 6775)
+++ trunk/data/models/player/pyria.txt 2009-05-26 12:54:24 UTC (rev 6776)
@@ -2,6 +2,7 @@
models/player/pyria
0
models/player/pyria.zym
+species human
Necro Warrior
Modified: trunk/data/models/player/quark.txt
===================================================================
--- trunk/data/models/player/quark.txt 2009-05-26 10:38:00 UTC (rev 6775)
+++ trunk/data/models/player/quark.txt 2009-05-26 12:54:24 UTC (rev 6776)
@@ -2,6 +2,7 @@
models/player/quark
0
models/player/crash.zym
+species robot_shiny
Robot Fighter
Modified: trunk/data/models/player/reptile.txt
===================================================================
--- trunk/data/models/player/reptile.txt 2009-05-26 10:38:00 UTC (rev 6775)
+++ trunk/data/models/player/reptile.txt 2009-05-26 12:54:24 UTC (rev 6776)
@@ -2,6 +2,7 @@
models/player/reptile
1
models/player/lurk.zym
+species alien
Reptilian Combatant
Modified: trunk/data/models/player/shock.txt
===================================================================
--- trunk/data/models/player/shock.txt 2009-05-26 10:38:00 UTC (rev 6775)
+++ trunk/data/models/player/shock.txt 2009-05-26 12:54:24 UTC (rev 6776)
@@ -2,6 +2,7 @@
models/player/shock
0
models/player/shock.zym
+species human
Necro Warrior
Modified: trunk/data/models/player/skadi.txt
===================================================================
--- trunk/data/models/player/skadi.txt 2009-05-26 10:38:00 UTC (rev 6775)
+++ trunk/data/models/player/skadi.txt 2009-05-26 12:54:24 UTC (rev 6776)
@@ -2,6 +2,7 @@
models/player/skadi
0
models/player/skadi.zym
+species human
Necro Warrior
Modified: trunk/data/models/player/specop.txt
===================================================================
--- trunk/data/models/player/specop.txt 2009-05-26 10:38:00 UTC (rev 6775)
+++ trunk/data/models/player/specop.txt 2009-05-26 12:54:24 UTC (rev 6776)
@@ -2,6 +2,7 @@
models/player/specop
0
models/player/specop.zym
+species human
Solo Warrior
Modified: trunk/data/models/player/xolar.txt
===================================================================
--- trunk/data/models/player/xolar.txt 2009-05-26 10:38:00 UTC (rev 6775)
+++ trunk/data/models/player/xolar.txt 2009-05-26 12:54:24 UTC (rev 6776)
@@ -2,6 +2,7 @@
models/player/xolar
2
models/player/nexus.zym
+species robot_shiny
Nexuiz's Soldier
Modified: trunk/data/particles/particlefont.tga
===================================================================
(Binary files differ)
Modified: trunk/data/qcsrc/client/gibs.qc
===================================================================
--- trunk/data/qcsrc/client/gibs.qc 2009-05-26 10:38:00 UTC (rev 6775)
+++ trunk/data/qcsrc/client/gibs.qc 2009-05-26 12:54:24 UTC (rev 6776)
@@ -1,3 +1,17 @@
+string species_prefix(float specnum)
+{
+ switch(specnum)
+ {
+ case SPECIES_HUMAN: return "";
+ case SPECIES_ALIEN: return "alien_";
+ case SPECIES_ROBOT_SHINY: return "robot_";
+ case SPECIES_ROBOT_RUSTY: return "robot_"; // use the same effects, only different gibs
+ case SPECIES_ANIMAL: return "animal_";
+ case SPECIES_RESERVED: return "reserved_";
+ default: return "";
+ }
+}
+
void SUB_RemoveOnNoImpact()
{
if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)
@@ -15,7 +29,7 @@
}
sound(self, CHAN_PAIN, strcat("misc/gib_splat0", ftos(floor(prandom() * 4 + 1)), ".wav"), VOL_BASE, ATTN_NORM);
- pointparticles(particleeffectnum("blood"), self.origin + '0 0 1', '0 0 30', 10);
+ pointparticles(particleeffectnum(strcat(species_prefix(self.cnt), "_blood")), self.origin + '0 0 1', '0 0 30', 10);
remove(self);
}
@@ -30,9 +44,9 @@
return;
if(self.touch == Gib_Touch) // don't do this for the "chunk" thingie...
- trailparticles(self, particleeffectnum("TR_SLIGHTBLOOD"), oldorg, self.origin);
+ trailparticles(self, particleeffectnum(strcat(species_prefix(self.cnt), "TR_SLIGHTBLOOD")), oldorg, self.origin);
else
- trailparticles(self, particleeffectnum("TR_BLOOD"), oldorg, self.origin);
+ trailparticles(self, particleeffectnum(strcat(species_prefix(self.cnt), "TR_BLOOD")), oldorg, self.origin);
self.renderflags = 0;
self.alpha = bound(0, self.nextthink - time, 1);
@@ -43,7 +57,7 @@
R_AddEntity(self);
}
-void TossGib (string mdlname, vector org, vector vconst, vector vrand, float destroyontouch)
+void TossGib (string mdlname, vector org, vector vconst, vector vrand, float specnum, float destroyontouch)
{
entity gib;
@@ -54,8 +68,10 @@
gib.move_movetype = MOVETYPE_BOUNCE;
gib.gravity = 1;
gib.solid = SOLID_CORPSE;
+ gib.cnt = specnum;
setmodel (gib, mdlname); // precision set above
+ gib.skin = specnum;
setsize (gib, '-8 -8 -8', '8 8 8');
@@ -76,8 +92,9 @@
void Ent_GibSplash()
{
- float amount, type;
+ float amount, type, specnum;
vector org, vel, mi, ma;
+ string specstr;
float c, gibfactor, randomvalue;
@@ -104,51 +121,55 @@
self.origin = org; // for the sounds
+ specnum = (type & 0x78) / 8; // blood/gibmodel type: using four bits (0..15, bit indexes 3,4,5,6)
+ type = type & 0x87; // remove the species bits: bit 7 = gentle, bit 0,1,2 = kind of gib
+ specstr = species_prefix(specnum);
+
switch(type)
{
case 0x01:
sound (self, CHAN_PAIN, "misc/gib.wav", VOL_BASE, ATTN_NORM);
if(prandom() < amount)
- TossGib("models/gibs/eye.md3", org, vel, prandomvec() * 150, 0);
+ TossGib ("models/gibs/eye.md3", org, vel, prandomvec() * 150, specnum, 0);
te_bloodshower(org + mi, org + ma, 1200, 1000 * amount);
if(prandom() < amount)
- TossGib("models/gibs/bloodyskull.md3", org, vel, prandomvec() * 100, 0);
+ TossGib ("models/gibs/bloodyskull.md3", org, vel, prandomvec() * 100, specnum, 0);
for(c = 0; c < amount; ++c)
{
randomvalue = amount - c;
if(prandom() < randomvalue)
- TossGib ("models/gibs/arm.md3", org, vel, prandomvec() * (prandom() * 120 + 90),0);
+ TossGib ("models/gibs/arm.md3", org, vel, prandomvec() * (prandom() * 120 + 90), specnum,0);
if(prandom() < randomvalue)
- TossGib ("models/gibs/arm.md3", org, vel, prandomvec() * (prandom() * 120 + 90),0);
+ TossGib ("models/gibs/arm.md3", org, vel, prandomvec() * (prandom() * 120 + 90), specnum,0);
if(prandom() < randomvalue)
- TossGib ("models/gibs/chest.md3", org + '0 0 -12', vel, prandomvec() * (prandom() * 120 + 80),0);
+ TossGib ("models/gibs/chest.md3", org + '0 0 -12', vel, prandomvec() * (prandom() * 120 + 80), specnum,0);
if(prandom() < randomvalue)
- TossGib ("models/gibs/smallchest.md3", org, vel, prandomvec() * (prandom() * 120 + 80),0);
+ TossGib ("models/gibs/smallchest.md3", org, vel, prandomvec() * (prandom() * 120 + 80), specnum,0);
if(prandom() < randomvalue)
- TossGib ("models/gibs/leg1.md3", org + '0 0 -5', vel, prandomvec() * (prandom() * 120 + 85),0);
+ TossGib ("models/gibs/leg1.md3", org + '0 0 -5', vel, prandomvec() * (prandom() * 120 + 85), specnum,0);
if(prandom() < randomvalue)
- TossGib ("models/gibs/leg2.md3", org + '0 0 -9', vel, prandomvec() * (prandom() * 120 + 85),0);
+ TossGib ("models/gibs/leg2.md3", org + '0 0 -9', vel, prandomvec() * (prandom() * 120 + 85), specnum,0);
// these splat on impact
if(prandom() < randomvalue)
- TossGib ("models/gibs/chunk.mdl", org, vel, prandomvec() * 450,1);
+ TossGib ("models/gibs/chunk.mdl", org, vel, prandomvec() * 450, specnum,1);
if(prandom() < randomvalue)
- TossGib ("models/gibs/chunk.mdl", org, vel, prandomvec() * 450,1);
+ TossGib ("models/gibs/chunk.mdl", org, vel, prandomvec() * 450, specnum,1);
if(prandom() < randomvalue)
- TossGib ("models/gibs/chunk.mdl", org, vel, prandomvec() * 450,1);
+ TossGib ("models/gibs/chunk.mdl", org, vel, prandomvec() * 450, specnum,1);
if(prandom() < randomvalue)
- TossGib ("models/gibs/chunk.mdl", org, vel, prandomvec() * 450,1);
+ TossGib ("models/gibs/chunk.mdl", org, vel, prandomvec() * 450, specnum,1);
}
break;
case 0x02:
- pointparticles(particleeffectnum("blood"), org, vel, amount * 16);
+ pointparticles(particleeffectnum(strcat(specstr, "blood")), org, vel, amount * 16);
break;
case 0x03:
if(prandom() < amount)
- TossGib ("models/gibs/chunk.mdl", org, vel, prandomvec() * (prandom() * 30 + 20), 1); // TODO maybe adjust to more randomization?
+ TossGib ("models/gibs/chunk.mdl", org, vel, prandomvec() * (prandom() * 30 + 20), specnum, 1); // TODO maybe adjust to more randomization?
break;
case 0x81:
pointparticles(particleeffectnum("damage_dissolve"), org, vel, amount);
Modified: trunk/data/qcsrc/common/constants.qh
===================================================================
--- trunk/data/qcsrc/common/constants.qh 2009-05-26 10:38:00 UTC (rev 6775)
+++ trunk/data/qcsrc/common/constants.qh 2009-05-26 12:54:24 UTC (rev 6776)
@@ -381,6 +381,13 @@
float PROJECTILE_BULLET_GLOWING = 18;
float PROJECTILE_CRYLINK_BOUNCING = 19;
+float SPECIES_HUMAN = 0;
+float SPECIES_ROBOT_SHINY = 1;
+float SPECIES_ALIEN = 2;
+float SPECIES_ROBOT_RUSTY = 3;
+float SPECIES_ANIMAL = 4;
+float SPECIES_RESERVED = 15;
+
// Deathtypes (weapon deathtypes are the IT_* constants below)
// NOTE: when adding death types, please add an explanation to Docs/spamlog.txt too.
float DEATH_SPECIAL_START = 10000;
Modified: trunk/data/qcsrc/menu/nexuiz/playermodel.c
===================================================================
--- trunk/data/qcsrc/menu/nexuiz/playermodel.c 2009-05-26 10:38:00 UTC (rev 6775)
+++ trunk/data/qcsrc/menu/nexuiz/playermodel.c 2009-05-26 12:54:24 UTC (rev 6776)
@@ -80,6 +80,7 @@
me.currentModelTxtName = strzone(fn);
me.currentModelTitle = strzone(t);
me.currentModelDescription = "";
+ fgets(fh); // Skip species
while((l = fgets(fh)))
{
if(me.currentModelDescription != "")
@@ -141,6 +142,7 @@
me.currentSkin = stof(fgets(fh));
me.currentModel = strzone(fgets(fh));
me.currentModelDescription = "";
+ fgets(fh); // Skip species
while((l = fgets(fh)))
{
if(me.currentModelDescription != "")
Modified: trunk/data/qcsrc/server/cl_client.qc
===================================================================
--- trunk/data/qcsrc/server/cl_client.qc 2009-05-26 10:38:00 UTC (rev 6775)
+++ trunk/data/qcsrc/server/cl_client.qc 2009-05-26 12:54:24 UTC (rev 6776)
@@ -610,7 +610,7 @@
void FixPlayermodel()
{
local string defaultmodel;
- local float defaultskin;
+ local float defaultskin, chmdl, oldskin;
local vector m1, m2;
defaultmodel = "";
@@ -649,6 +649,7 @@
}
self.skin = defaultskin;
+ self.species = player_getspecies();
} else {
if (self.playermodel != self.model)
{
@@ -657,9 +658,14 @@
m2 = self.maxs;
setmodel_lod (self, self.playermodel);
setsize (self, m1, m2);
+ chmdl = TRUE;
}
+ oldskin = self.skin;
self.skin = RestrictSkin(stof(self.playerskin));
+
+ if(chmdl || oldskin != self.skin)
+ self.species = player_getspecies(); // model or skin has changed
}
if(!teams_matter)
Modified: trunk/data/qcsrc/server/cl_player.qc
===================================================================
--- trunk/data/qcsrc/server/cl_player.qc 2009-05-26 10:38:00 UTC (rev 6775)
+++ trunk/data/qcsrc/server/cl_player.qc 2009-05-26 12:54:24 UTC (rev 6776)
@@ -45,6 +45,7 @@
self.armortype = oldself.armortype;
self.model = oldself.model;
self.modelindex = oldself.modelindex;
+ self.species = oldself.species;
self.movetype = oldself.movetype;
self.nextthink = oldself.nextthink;
self.skin = oldself.skin;
@@ -68,6 +69,58 @@
self = oldself;
}
+float player_getspecies()
+{
+ local float glob, i, j, fh, len, s, sk;
+ local string fn, l;
+
+ s = -1;
+
+ glob = search_begin("models/player/*.txt", TRUE, TRUE);
+ if(glob < 0)
+ return s;
+ for(j = 0; j <= 1; ++j)
+ {
+ for(i = 0; i < search_getsize(glob); ++i)
+ {
+ fn = search_getfilename(glob, i);
+ fh = fopen(fn, FILE_READ);
+ if(fh < 0)
+ continue;
+ fgets(fh); fgets(fh);
+ sk = stof(fgets(fh));
+ if(sk == (j ? 0 : self.skin)) // 2nd pass skips the skin test
+ if(fgets(fh) == self.model)
+ {
+ l = fgets(fh);
+ len = tokenize_console(l);
+ if (len != 2)
+ break;
+ if (argv(0) != "species")
+ break;
+ switch(argv(1))
+ {
+ case "human": s = SPECIES_HUMAN; break;
+ case "alien": s = SPECIES_ALIEN; break;
+ case "robot_shiny": s = SPECIES_ROBOT_SHINY; break;
+ case "robot_rusty": s = SPECIES_ROBOT_RUSTY; break;
+ case "animal": s = SPECIES_ANIMAL; break;
+ case "reserved": s = SPECIES_RESERVED; break;
+ }
+ }
+ fclose(fh);
+ }
+ if (s >= 0)
+ break;
+ }
+ search_end(glob);
+
+ if (s < 0)
+ s = SPECIES_HUMAN;
+
+ return s;
+}
+
void player_setupanimsformodel()
{
local string animfilename;
Modified: trunk/data/qcsrc/server/defs.qh
===================================================================
--- trunk/data/qcsrc/server/defs.qh 2009-05-26 10:38:00 UTC (rev 6775)
+++ trunk/data/qcsrc/server/defs.qh 2009-05-26 12:54:24 UTC (rev 6776)
@@ -167,6 +167,8 @@
.string playermodel;
.string playerskin;
+.float species;
+
.float respawntime;
.float respawntimejitter;
//.float chasecam;
Modified: trunk/data/qcsrc/server/g_violence.qc
===================================================================
--- trunk/data/qcsrc/server/g_violence.qc 2009-05-26 10:38:00 UTC (rev 6775)
+++ trunk/data/qcsrc/server/g_violence.qc 2009-05-26 12:54:24 UTC (rev 6776)
@@ -20,9 +20,10 @@
e = spawn();
e.classname = "gibsplash";
e.cnt = amount;
- e.state = type;
+ e.state = type; // should stay smaller than 15
if(sv_gentle)
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;
Added: trunk/data/textures/bloodyskull_alien.tga
===================================================================
(Binary files differ)
Property changes on: trunk/data/textures/bloodyskull_alien.tga
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/textures/bloodyskull_alien_glow.tga
===================================================================
(Binary files differ)
Property changes on: trunk/data/textures/bloodyskull_alien_glow.tga
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/textures/bloodyskull_robot.tga
===================================================================
(Binary files differ)
Property changes on: trunk/data/textures/bloodyskull_robot.tga
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/textures/bloodyskull_robot_gloss.tga
===================================================================
(Binary files differ)
Property changes on: trunk/data/textures/bloodyskull_robot_gloss.tga
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/textures/bloodyskull_robot_glow.tga
===================================================================
(Binary files differ)
Property changes on: trunk/data/textures/bloodyskull_robot_glow.tga
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/textures/meat_alien.tga
===================================================================
(Binary files differ)
Property changes on: trunk/data/textures/meat_alien.tga
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/textures/meat_alien_gloss.tga
===================================================================
(Binary files differ)
Property changes on: trunk/data/textures/meat_alien_gloss.tga
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/textures/meat_alien_glow.tga
===================================================================
(Binary files differ)
Property changes on: trunk/data/textures/meat_alien_glow.tga
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/textures/meat_alien_norm.tga
===================================================================
(Binary files differ)
Property changes on: trunk/data/textures/meat_alien_norm.tga
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/textures/meat_robot.tga
===================================================================
(Binary files differ)
Property changes on: trunk/data/textures/meat_robot.tga
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/textures/meat_robot_gloss.tga
===================================================================
(Binary files differ)
Property changes on: trunk/data/textures/meat_robot_gloss.tga
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/textures/meat_robot_glow.tga
===================================================================
(Binary files differ)
Property changes on: trunk/data/textures/meat_robot_glow.tga
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/data/textures/meat_robot_norm.tga
===================================================================
(Binary files differ)
Property changes on: trunk/data/textures/meat_robot_norm.tga
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
More information about the nexuiz-commits
mailing list