Browse Source

Make penguins explosive

opforfixed
Roman Chistokhodov 5 years ago
parent
commit
017d3d8295
  1. 32
      dlls/gearbox/penguin.cpp

32
dlls/gearbox/penguin.cpp

@ -131,7 +131,7 @@ void CPenguinGrenade::Spawn(void) @@ -131,7 +131,7 @@ void CPenguinGrenade::Spawn(void)
pev->gravity = 0.5;
pev->friction = 0.5;
pev->dmg = gSkillData.snarkDmgPop;
pev->dmg = gSkillData.plrDmgHandGrenade;
m_flDie = gpGlobals->time + PENGUIN_DETONATE_DELAY;
@ -161,33 +161,12 @@ void CPenguinGrenade::Precache(void) @@ -161,33 +161,12 @@ void CPenguinGrenade::Precache(void)
void CPenguinGrenade::Killed(entvars_t *pevAttacker, int iGib)
{
pev->model = iStringNull;// make invisible
SetThink(&CPenguinGrenade::SUB_Remove);
SetTouch(NULL);
pev->nextthink = gpGlobals->time + 0.1;
// since squeak grenades never leave a body behind, clear out their takedamage now.
// Squeaks do a bit of radius damage when they pop, and that radius damage will
// continue to call this function unless we acknowledge the Squeak's death now. (sjb)
pev->takedamage = DAMAGE_NO;
// play squeek blast
EMIT_SOUND_DYN(ENT(pev), CHAN_ITEM, "squeek/sqk_blast1.wav", 1, 0.5, 0, PITCH_NORM);
CSoundEnt::InsertSound(bits_SOUND_COMBAT, pev->origin, SMALL_EXPLOSION_VOLUME, 3.0);
UTIL_BloodDrips(pev->origin, g_vecZero, BloodColor(), 80);
if( m_hOwner != 0 )
RadiusDamage(pev, m_hOwner->pev, pev->dmg, CLASS_NONE, DMG_BLAST);
else
RadiusDamage(pev, pev, pev->dmg, CLASS_NONE, DMG_BLAST);
// reset owner so death message happens
pev->owner = m_hOwner->edict();
CGrenade::Detonate();
UTIL_BloodDrips( pev->origin, g_vecZero, BloodColor(), 80 );
if( m_hOwner != 0 )
pev->owner = m_hOwner->edict();
CBaseMonster::Killed(pevAttacker, GIB_ALWAYS);
}
void CPenguinGrenade::GibMonster(void)
@ -358,7 +337,8 @@ void CPenguinGrenade::SuperBounceTouch(CBaseEntity *pOther) @@ -358,7 +337,8 @@ void CPenguinGrenade::SuperBounceTouch(CBaseEntity *pOther)
else
ApplyMultiDamage(pev, pev);
pev->dmg += gSkillData.snarkDmgPop; // add more explosion damage
pev->dmg += gSkillData.plrDmgHandGrenade; // add more explosion damage
pev->dmg = Q_min(pev->dmg, 500);
// m_flDie += 2.0; // add more life
// make bite sound

Loading…
Cancel
Save