From 97251860924777e429ce277ba1169a0c8f67584f Mon Sep 17 00:00:00 2001 From: tzork Date: Wed, 4 Nov 2009 13:03:02 +0000 Subject: [PATCH] New DEATH_'s git-svn-id: svn://svn.icculus.org/nexuiz/trunk@8204 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/qcsrc/common/constants.qh | 24 ++++++++++++++++++++++-- data/qcsrc/server/g_damage.qc | 27 +++++++++++++++++++++++++-- 2 files changed, 47 insertions(+), 4 deletions(-) diff --git a/data/qcsrc/common/constants.qh b/data/qcsrc/common/constants.qh index 2106825f3..3fba75e11 100644 --- a/data/qcsrc/common/constants.qh +++ b/data/qcsrc/common/constants.qh @@ -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 diff --git a/data/qcsrc/server/g_damage.qc b/data/qcsrc/server/g_damage.qc index c1fb0c9a6..f1d927955 100644 --- a/data/qcsrc/server/g_damage.qc +++ b/data/qcsrc/server/g_damage.qc @@ -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; -- 2.39.2