From 2620175e1358f9995432bc2a0ef2fdaf9a76128e Mon Sep 17 00:00:00 2001 From: lordhavoc Date: Tue, 28 Jun 2005 00:01:18 +0000 Subject: [PATCH] fix two rocket launcher kill bugs detailed in the thread http://www.nexuiz.com/forums/index.php?showtopic=731 git-svn-id: svn://svn.icculus.org/nexuiz/trunk@470 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- qcsrc/gamec/g_damage.c | 6 +++--- qcsrc/gamec/w_rocketlauncher.c | 10 +++------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/qcsrc/gamec/g_damage.c b/qcsrc/gamec/g_damage.c index 60cee6987..9712de111 100644 --- a/qcsrc/gamec/g_damage.c +++ b/qcsrc/gamec/g_damage.c @@ -37,7 +37,7 @@ void Obituary (entity attacker, entity targ, float deathtype) bprint ("^1",attacker.netname," ended a ",ftos(attacker.killcount)," kill spree by killing a teammate\n"); attacker.killcount = 0; } - else if (attacker.classname == "player") + else if (attacker.classname == "player" || attacker.classname == "gib") { if (!checkrules_firstblood) { @@ -128,10 +128,10 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float if (self.event_damage) self.event_damage (inflictor, attacker, damage, deathtype, hitloc, force); self = oldself; - + // Savage: vampire mode if(cvar("g_vampire") && targ.classname == "player" && attacker.classname == "player" && attacker != targ) { - attacker.health += damage; + attacker.health += damage; } } diff --git a/qcsrc/gamec/w_rocketlauncher.c b/qcsrc/gamec/w_rocketlauncher.c index 2e755a266..36dfe35bb 100644 --- a/qcsrc/gamec/w_rocketlauncher.c +++ b/qcsrc/gamec/w_rocketlauncher.c @@ -51,13 +51,9 @@ void W_Rocket_Think (void) W_Rocket_Explode (); return; } - if (self.owner) - { - if (self.owner.deadflag) - self.owner = self; - else if (self.owner.weapon == WEP_ROCKET_LAUNCHER && self.owner.button3) - W_Rocket_Explode (); - } + if (self.owner.weapon == WEP_ROCKET_LAUNCHER) + if (self.owner.button3) + W_Rocket_Explode (); } void W_Rocket_Touch (void) -- 2.39.2