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;
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;
}
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);
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);
//_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;