New DEATH_'s
authortzork <tzork@f962a42d-fe04-0410-a3ab-8c8b0445ebaa>
Wed, 4 Nov 2009 13:03:02 +0000 (13:03 +0000)
committertzork <tzork@f962a42d-fe04-0410-a3ab-8c8b0445ebaa>
Wed, 4 Nov 2009 13:03:02 +0000 (13:03 +0000)
git-svn-id: svn://svn.icculus.org/nexuiz/trunk@8204 f962a42d-fe04-0410-a3ab-8c8b0445ebaa

data/qcsrc/common/constants.qh
data/qcsrc/server/g_damage.qc

index 2106825..3fba75e 100644 (file)
@@ -272,6 +272,15 @@ const float CTF_STATE_COMMANDER = 3;
 const float STAT_HUD = 50;
 const float HUD_NORMAL = 0;
 const float HUD_SPIDERBOT = 10;
+const float HUD_WAKIZASHI = 11;
+
+const float STAT_VEHICLESTAT_HEALTH  = 60;
+const float STAT_VEHICLESTAT_SHIELD  = 61;
+const float STAT_VEHICLESTAT_ENERGY  = 62;
+const float STAT_VEHICLESTAT_AMMO1   = 63;
+const float STAT_VEHICLESTAT_RELOAD1 = 64;
+const float STAT_VEHICLESTAT_AMMO2   = 65;
+const float STAT_VEHICLESTAT_RELOAD2 = 66;
 
 const float STAT_SPIDERBOT_HEALTH  = 60;
 const float STAT_SPIDERBOT_ROCKETS = 61;
@@ -281,7 +290,6 @@ const float STAT_SPIDERBOT_ENERGY  = 64;
 const float STAT_SPIDERBOT_SHIELD  = 65;
 
 //const float STAT_SPIDERBOT_AIM     53 // compressShotOrigin
-
 //const float STAT_SPIDERBOT_TARGET  54 // compressShotOrigin
 
 
@@ -441,7 +449,19 @@ float DEATH_MIRRORDAMAGE = 10014;
 float DEATH_TOUCHEXPLODE = 10015;
 float DEATH_CHEAT = 10016;
 float DEATH_FIRE = 10017;
-float DEATH_TURRET = 10100;
+float DEATH_TURRET = 10020;
+
+float DEATH_SBMINIGUN = 10030;
+float DEATH_SBROCKET  = 10031;
+float DEATH_SBCRUSH   = 10032;
+float DEATH_SBBLOWUP  = 10033;
+
+float DEATH_WAKIGUN    = 10040;
+float DEATH_WAKIROCKET = 10041;
+float DEATH_WAKIBLOWUP = 10042;
+
+float DEATH_CUSTOM = 10300;
+
 
 float DEATH_WEAPONMASK = 0xFF;
 float DEATH_HITTYPEMASK = 0x1F00; // which is WAY below 10000 used for normal deaths
index c1fb0c9..f1d9279 100644 (file)
@@ -236,6 +236,7 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
                        s = "A corpse";
                else
                        s = targ.netname;
+
                a = attacker.netname;
 
                if (targ == attacker)
@@ -376,7 +377,7 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
                                        if((cvar("sv_fragmessage_information_typefrag")) && (targ.BUTTON_CHAT)) {
                                                centerprint(attacker, strcat(DAMAGE_CENTERPRINT_SPACER, blood_message, "^1You typefragged ^7", s, GetAdvancedDeathReports(targ)));
                                                centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, victim_message, "^1You were typefragged by ^7", a, GetAdvancedDeathReports(attacker)));
-                                       } else { 
+                                       } else {
                                                centerprint(attacker, strcat(DAMAGE_CENTERPRINT_SPACER, blood_message, "^4You fragged ^7", s, GetAdvancedDeathReports(targ)));
                                                centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, victim_message, "^1You were fragged by ^7", a, GetAdvancedDeathReports(attacker)));
                                        }
@@ -420,6 +421,22 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
                                                else
                                                        bprint("^1", s, "^1 ", substring(inflictor.message2, 0, p), a, "^1", substring(inflictor.message2, p+1, strlen(inflictor.message2) - (p+1)), "\n");
                                        }
+                                       else if(deathtype == DEATH_SBCRUSH)
+                        bprint ("^1",s, "^1 was crushed by ^1", a, "\n");
+                                       else if(deathtype == DEATH_SBMINIGUN)
+                        bprint ("^1",s, "^1 got shredded by ^1", a, "\n");
+                                       else if(deathtype == DEATH_SBROCKET)
+                        bprint ("^1",s, "^1 was blased to bits by ^1", a, "\n");
+                                       else if(deathtype == DEATH_SBBLOWUP)
+                        bprint ("^1",s, "^1 got cought in the destruction of ^1", a, "'s vehicle\n");
+
+                                       else if(deathtype == DEATH_WAKIGUN)
+                        bprint ("^1",s, "^1 was bolted down by ^1", a, "\n");
+                                       else if(deathtype == DEATH_WAKIROCKET)
+                        bprint ("^1",s, "^1 could find no shelter from ^1", a, "'s rockets\n");
+                                       else if(deathtype == DEATH_WAKIBLOWUP)
+                        bprint ("^1",s, "^1 dies when ^1", a, "'s wakizashi dies.\n");
+
                                        else if(deathtype == DEATH_TURRET)
                                                bprint ("^1",s, "^1 was pushed into the line of fire by ^1", a, "\n");
                                        else if(deathtype == DEATH_TOUCHEXPLODE)
@@ -427,7 +444,9 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
                                        else if(deathtype == DEATH_CHEAT)
                                                bprint ("^1",s, "^1 was unfairly eliminated by ^1", a, "\n");
                                        else if (deathtype == DEATH_FIRE)
-                                               bprint ("^1",s, "^1 was burnt to death by ^1", a, "\n");
+                                       bprint ("^1",s, "^1 was burnt to death by ^1", a, "\n");
+                                       else if (deathtype == DEATH_CUSTOM)
+                                               bprint ("^1",s, "^1 ", deathmessage, " by ^1", a, "\n");
                                        else
                                                bprint ("^1",s, "^1 was fragged by ", a, "\n");
                                }
@@ -555,6 +574,8 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
                                        bprint ("^1",s, "^1 is now conserved for centuries to come\n");
                        else if(deathtype == DEATH_TURRET)
                                bprint ("^1",s, "^1 was mowed down by a turret \n");
+            else if (deathtype == DEATH_CUSTOM)
+                bprint ("^1",s, "^1 ", deathmessage, "\n");
                        else if(deathtype == DEATH_TOUCHEXPLODE)
                                bprint ("^1",s, "^1 died in an accident\n");
                        else if(deathtype == DEATH_CHEAT)
@@ -582,9 +603,11 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
 
                        LogDeath("accident", deathtype, targ, targ);
                }
+
                targ.death_origin = targ.origin;
                if(targ != attacker)
                        targ.killer_origin = attacker.origin;
+
                // FIXME: this should go in PutClientInServer
                if (targ.killcount)
                        targ.killcount = 0;