From 97dd9bef42ad737becee67b2af745bfa8face1b1 Mon Sep 17 00:00:00 2001 From: Samual Lenks Date: Mon, 4 Mar 2013 17:33:30 -0500 Subject: [PATCH] Begin final cleanup-- remove w_deathtypestring (no longer a string) --- qcsrc/client/Defs.qc | 1 - qcsrc/client/hud.qc | 14 ------ qcsrc/common/constants.qh | 4 +- qcsrc/server/defs.qh | 2 - qcsrc/server/mutators/gamemode_nexball.qc | 8 +-- qcsrc/server/tturrets/units/unit_phaser.qc | 1 - qcsrc/server/tturrets/units/unit_tessla.qc | 2 - qcsrc/server/w_minstanex.qc | 4 -- qcsrc/server/w_tuba.qc | 57 +--------------------- 9 files changed, 5 insertions(+), 88 deletions(-) diff --git a/qcsrc/client/Defs.qc b/qcsrc/client/Defs.qc index d65c517a3..b89a177f0 100644 --- a/qcsrc/client/Defs.qc +++ b/qcsrc/client/Defs.qc @@ -248,7 +248,6 @@ vector angles_held; .float silent; float w_deathtype, w_issilent, w_random; -string w_deathtypestring; vector w_org, w_backoff; float rifle_scope; diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 4b0bfa4fb..9d14fe81f 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -1629,20 +1629,6 @@ void HUD_HealthArmor(void) // Notification area (#4) // -string Weapon_SuicideMessage(float deathtype) -{ - w_deathtype = deathtype; - get_weaponinfo(DEATH_WEAPONOF(deathtype)).weapon_func(WR_SUICIDEMESSAGE); - return w_deathtypestring; -} - -string Weapon_KillMessage(float deathtype) -{ - w_deathtype = deathtype; - get_weaponinfo(DEATH_WEAPONOF(deathtype)).weapon_func(WR_KILLMESSAGE); - return w_deathtypestring; -} - void HUD_Notify_Push(string icon, string attacker, string victim) { if(icon != "") diff --git a/qcsrc/common/constants.qh b/qcsrc/common/constants.qh index a3fc83367..c25fb059f 100644 --- a/qcsrc/common/constants.qh +++ b/qcsrc/common/constants.qh @@ -383,8 +383,8 @@ float WR_CHECKAMMO1 = 3; // (SVQC) checks ammo for weapon float WR_CHECKAMMO2 = 4; // (SVQC) checks ammo for weapon float WR_AIM = 5; // (SVQC) runs bot aiming code for this weapon float WR_PRECACHE = 6; // (CSQC and SVQC) precaches models/sounds used by this weapon -float WR_SUICIDEMESSAGE = 7; // (CSQC) sets w_deathtypestring or leaves it alone (and may inspect w_deathtype for details) -float WR_KILLMESSAGE = 8; // (CSQC) sets w_deathtypestring or leaves it alone +float WR_SUICIDEMESSAGE = 7; // (SVQC) notification number for suicide message (may inspect w_deathtype for details) +float WR_KILLMESSAGE = 8; // (SVQC) notification number for kill message (may inspect w_deathtype for details) float WR_RELOAD = 9; // (SVQC) does not need to do anything float WR_RESETPLAYER = 10; // (SVQC) does not need to do anything float WR_IMPACTEFFECT = 11; // (CSQC) impact effect diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index 84be80de4..5eaafe4f1 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -208,8 +208,6 @@ float WS_READY = 4; // idle frame void weapon_defaultspawnfunc(float wpn); -string w_deathtypestring; - .vector dest1, dest2; float gameover; diff --git a/qcsrc/server/mutators/gamemode_nexball.qc b/qcsrc/server/mutators/gamemode_nexball.qc index ed2e7b16a..8790162af 100644 --- a/qcsrc/server/mutators/gamemode_nexball.qc +++ b/qcsrc/server/mutators/gamemode_nexball.qc @@ -844,14 +844,8 @@ float w_nexball_weapon(float req) precache_sound("misc/typehit.wav"); } else if(req == WR_SETUP) - weapon_setup(WEP_PORTO); - else if(req == WR_SUICIDEMESSAGE) - { - w_deathtypestring = "is a weirdo"; - } - else if(req == WR_KILLMESSAGE) { - w_deathtypestring = "got killed by #'s black magic"; + weapon_setup(WEP_PORTO); } // No need to check WR_CHECKAMMO* or WR_AIM, it should always return TRUE return TRUE; diff --git a/qcsrc/server/tturrets/units/unit_phaser.qc b/qcsrc/server/tturrets/units/unit_phaser.qc index 91794929b..2f28c7c3b 100644 --- a/qcsrc/server/tturrets/units/unit_phaser.qc +++ b/qcsrc/server/tturrets/units/unit_phaser.qc @@ -60,7 +60,6 @@ void beam_think() entity oldself; oldself = self; self = self.owner; - //w_deathtypestring = "was phased out of existence"; FireImoBeam ( self.tur_shotorg, self.tur_shotorg + self.tur_shotdir_updated * self.target_range, '-1 -1 -1' * self.shot_radius, diff --git a/qcsrc/server/tturrets/units/unit_tessla.qc b/qcsrc/server/tturrets/units/unit_tessla.qc index 87fda8ed2..596993891 100644 --- a/qcsrc/server/tturrets/units/unit_tessla.qc +++ b/qcsrc/server/tturrets/units/unit_tessla.qc @@ -86,8 +86,6 @@ void turret_tesla_fire() entity e, t; float d, r, i; - //w_deathtypestring = "discoverd how a tesla coil works"; - d = self.shot_dmg; r = self.target_range; e = spawn(); diff --git a/qcsrc/server/w_minstanex.qc b/qcsrc/server/w_minstanex.qc index 1f8656fb8..c464af93a 100644 --- a/qcsrc/server/w_minstanex.qc +++ b/qcsrc/server/w_minstanex.qc @@ -297,10 +297,6 @@ float w_minstanex(float req) { precache_sound("weapons/neximpact.wav"); } - else if (req == WR_SUICIDEMESSAGE) - w_deathtypestring = _("%s is now thinking with portals"); - else if (req == WR_KILLMESSAGE) - w_deathtypestring = _("%s has been vaporized by %s's minstanex"); return TRUE; } #endif diff --git a/qcsrc/server/w_tuba.qc b/qcsrc/server/w_tuba.qc index 9e0d24c04..6b3287b59 100644 --- a/qcsrc/server/w_tuba.qc +++ b/qcsrc/server/w_tuba.qc @@ -447,61 +447,8 @@ float w_tuba(float req) #ifdef CSQC float w_tuba(float req) { - if(req == WR_IMPACTEFFECT) - { - // nothing to do here; particles of tuba are handled differently - } - else if(req == WR_PRECACHE) - { - // nothing to do - } -/*<<<<<<< HEAD -======= - else if (req == WR_SUICIDEMESSAGE) - { - float instr; - instr = 0; - if(w_deathtype & HITTYPE_SECONDARY) - instr |= 1; - if(w_deathtype & HITTYPE_BOUNCE) - instr |= 2; - switch(instr) - { - default: - case 0: // Tuba - w_deathtypestring = _("%s hurt his own ears with the @!#%%'n Tuba"); - break; - case 1: // Accordeon - w_deathtypestring = _("%s hurt his own ears with the @!#%%'n Accordeon"); - break; - case 2: // Klein Bottle - w_deathtypestring = _("%s hurt his own ears with the @!#%%'n Klein Bottle"); - break; - } - } - else if (req == WR_KILLMESSAGE) - { - float instr; - instr = 0; - if(w_deathtype & HITTYPE_SECONDARY) - instr |= 1; - if(w_deathtype & HITTYPE_BOUNCE) - instr |= 2; - switch(instr) - { - default: - case 0: // Tuba - w_deathtypestring = _("%s died of %s's great playing on the @!#%%'n Tuba"); - break; - case 1: // Accordeon - w_deathtypestring = _("%s died of %s's great playing on the @!#%%'n Accordeon"); - break; - case 2: // Klein Bottle - w_deathtypestring = _("%s died of %s's great playing on the @!#%%'n Klein Bottle"); - break; - } - } ->>>>>>> origin/master*/ + // nothing to do here; particles of tuba are handled differently + return TRUE; } #endif -- 2.39.2