mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-24 05:34:18 +00:00
Make penguins explosive
This commit is contained in:
parent
4a4a460beb
commit
017d3d8295
@ -131,7 +131,7 @@ void CPenguinGrenade::Spawn(void)
|
|||||||
pev->gravity = 0.5;
|
pev->gravity = 0.5;
|
||||||
pev->friction = 0.5;
|
pev->friction = 0.5;
|
||||||
|
|
||||||
pev->dmg = gSkillData.snarkDmgPop;
|
pev->dmg = gSkillData.plrDmgHandGrenade;
|
||||||
|
|
||||||
m_flDie = gpGlobals->time + PENGUIN_DETONATE_DELAY;
|
m_flDie = gpGlobals->time + PENGUIN_DETONATE_DELAY;
|
||||||
|
|
||||||
@ -161,33 +161,12 @@ void CPenguinGrenade::Precache(void)
|
|||||||
|
|
||||||
void CPenguinGrenade::Killed(entvars_t *pevAttacker, int iGib)
|
void CPenguinGrenade::Killed(entvars_t *pevAttacker, int iGib)
|
||||||
{
|
{
|
||||||
pev->model = iStringNull;// make invisible
|
if( m_hOwner != 0 )
|
||||||
SetThink(&CPenguinGrenade::SUB_Remove);
|
pev->owner = m_hOwner->edict();
|
||||||
SetTouch(NULL);
|
CGrenade::Detonate();
|
||||||
pev->nextthink = gpGlobals->time + 0.1;
|
UTIL_BloodDrips( pev->origin, g_vecZero, BloodColor(), 80 );
|
||||||
|
if( m_hOwner != 0 )
|
||||||
// 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
|
|
||||||
if (m_hOwner != 0)
|
|
||||||
pev->owner = m_hOwner->edict();
|
pev->owner = m_hOwner->edict();
|
||||||
|
|
||||||
CBaseMonster::Killed(pevAttacker, GIB_ALWAYS);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPenguinGrenade::GibMonster(void)
|
void CPenguinGrenade::GibMonster(void)
|
||||||
@ -358,7 +337,8 @@ void CPenguinGrenade::SuperBounceTouch(CBaseEntity *pOther)
|
|||||||
else
|
else
|
||||||
ApplyMultiDamage(pev, pev);
|
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
|
// m_flDie += 2.0; // add more life
|
||||||
|
|
||||||
// make bite sound
|
// make bite sound
|
||||||
|
Loading…
x
Reference in New Issue
Block a user