From 46450bf7ee483c5cf5452b2634a2f8d57a96a435 Mon Sep 17 00:00:00 2001 From: mittorn Date: Sun, 4 Sep 2016 19:28:06 +0000 Subject: [PATCH] Hornet tweak --- dlls/hornet.cpp | 2 ++ dlls/hornet.h | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/dlls/hornet.cpp b/dlls/hornet.cpp index 1e7025a0..99862bce 100644 --- a/dlls/hornet.cpp +++ b/dlls/hornet.cpp @@ -424,6 +424,8 @@ void CHornet::DieTouch( CBaseEntity *pOther ) break; } + if( !pev->owner ) + pev->owner = edict(); pOther->TakeDamage( pev, VARS( pev->owner ), pev->dmg, DMG_BULLET ); } diff --git a/dlls/hornet.h b/dlls/hornet.h index dc78fc40..d917da5f 100644 --- a/dlls/hornet.h +++ b/dlls/hornet.h @@ -48,6 +48,14 @@ public: void EXPORT TrackTouch( CBaseEntity *pOther ); void EXPORT DartTouch( CBaseEntity *pOther ); void EXPORT DieTouch( CBaseEntity *pOther ); + virtual float TouchGravGun( CBaseEntity *attacker, int stage ) + { + pev->owner = attacker->edict(); + pev->dmg *= 2; + if( m_pfnThink == &CBaseEntity::SUB_Remove ) + pev->nextthink = gpGlobals->time + 1; + return 1000; + } int TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType );