From: Mario Date: Sat, 15 Jun 2013 00:57:47 +0000 (+1000) Subject: Move thrown nades to the side a bit more X-Git-Tag: xonotic-v0.8.0~366^2~12 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=56cc3610ea492666454c26b5cb3793cd3cdd9d06;p=xonotic%2Fxonotic-data.pk3dir.git Move thrown nades to the side a bit more --- diff --git a/qcsrc/server/mutators/mutator_nades.qc b/qcsrc/server/mutators/mutator_nades.qc index b3588c637..c2db6322f 100644 --- a/qcsrc/server/mutators/mutator_nades.qc +++ b/qcsrc/server/mutators/mutator_nades.qc @@ -82,7 +82,7 @@ void nade_touch() PROJECTILE_TOUCH; //setsize(self, '-2 -2 -2', '2 2 2'); //UpdateCSQCProjectile(self); - if(self.health == autocvar_g_nades_nade_health) + if(self.health == self.max_health) { spamsound(self, CH_SHOTS, strcat("weapons/grenade_bounce", ftos(1 + rint(random() * 5)), ".wav"), VOL_BASE, ATTN_NORM); return; @@ -107,18 +107,18 @@ void nade_damage(entity inflictor, entity attacker, float damage, float deathtyp if(DEATH_ISWEAPON(deathtype, WEP_NEX) || DEATH_ISWEAPON(deathtype, WEP_MINSTANEX)) { force *= 6; - damage = autocvar_g_nades_nade_health * 0.55; + damage = self.max_health * 0.55; } if(DEATH_ISWEAPON(deathtype, WEP_UZI)) - damage = autocvar_g_nades_nade_health * 0.1; + damage = self.max_health * 0.1; if(DEATH_ISWEAPON(deathtype, WEP_SHOTGUN) && !(deathtype & HITTYPE_SECONDARY)) - damage = autocvar_g_nades_nade_health * 1.1; + damage = self.max_health * 1.1; if(DEATH_ISWEAPON(deathtype, WEP_SHOTGUN) && (deathtype & HITTYPE_SECONDARY)) { - damage = autocvar_g_nades_nade_health * 0.1; + damage = self.max_health * 0.1; force *= 15; } @@ -127,7 +127,7 @@ void nade_damage(entity inflictor, entity attacker, float damage, float deathtyp if(!damage) return; - if(self.health == autocvar_g_nades_nade_health) + if(self.health == self.max_health) { sound(self, CH_SHOTS_SINGLE, "misc/null.wav", VOL_BASE, 0.5 *(ATTN_LARGE + ATTN_MAX)); self.nextthink = max(time + autocvar_g_nades_nade_lifetime, time); @@ -158,7 +158,7 @@ void toss_nade(entity e, vector _velocity, float _time) Kill_Notification(NOTIF_ONE_ONLY, e, MSG_CENTER_CPID, CPID_NADES); //setorigin(_nade, CENTER_OR_VIEWOFS(e) + (v_right * 10) * -1); - setorigin(_nade, w_shotorg + (v_right * 10) * -1); + setorigin(_nade, w_shotorg + (v_right * 25) * -1); setmodel(_nade, "models/weapons/v_ok_grenade.md3"); setattachment(_nade, world, ""); PROJECTILE_MAKETRIGGER(_nade); @@ -181,6 +181,7 @@ void toss_nade(entity e, vector _velocity, float _time) //_nade.solid = SOLID_BBOX; // TODO: remember why this was needed _nade.touch = nade_touch; _nade.health = autocvar_g_nades_nade_health; + _nade.max_health = _nade.health; _nade.takedamage = DAMAGE_AIM; _nade.event_damage = nade_damage; _nade.teleportable = TRUE;