|
|
|
@ -726,20 +726,21 @@ void CGib :: BounceGibTouch ( CBaseEntity *pOther )
@@ -726,20 +726,21 @@ void CGib :: BounceGibTouch ( CBaseEntity *pOther )
|
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
if ( pev->velocity.Length() > 300) |
|
|
|
|
{ |
|
|
|
|
entvars_t *pevOwner = pev; |
|
|
|
|
if( pev->owner) |
|
|
|
|
pevOwner = &pev->owner->v; |
|
|
|
|
if(pevOwner) |
|
|
|
|
if ( m_flNextAttack < gpGlobals->time && pev->velocity.Length() > 300 ) |
|
|
|
|
{ |
|
|
|
|
float dmg = 10 + pev->velocity.Length() / 50; |
|
|
|
|
TraceResult tr = UTIL_GetGlobalTrace(); |
|
|
|
|
ClearMultiDamage(); |
|
|
|
|
pOther->TraceAttack(pevOwner, dmg, gpGlobals->v_forward, &tr, DMG_CLUB); |
|
|
|
|
ApplyMultiDamage(pev, pevOwner); |
|
|
|
|
entvars_t *pevOwner = pev; |
|
|
|
|
if( pev->owner) |
|
|
|
|
pevOwner = &pev->owner->v; |
|
|
|
|
if(pevOwner) |
|
|
|
|
{ |
|
|
|
|
float dmg = 10 + pev->velocity.Length() / 50; |
|
|
|
|
TraceResult tr = UTIL_GetGlobalTrace(); |
|
|
|
|
ClearMultiDamage(); |
|
|
|
|
pOther->TraceAttack(pevOwner, dmg, gpGlobals->v_forward, &tr, DMG_CLUB); |
|
|
|
|
ApplyMultiDamage(pev, pevOwner); |
|
|
|
|
} |
|
|
|
|
m_flNextAttack = gpGlobals->time + 1.0; // debounce
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if ( g_Language != LANGUAGE_GERMAN && m_cBloodDecals > 0 && m_bloodColor != DONT_BLEED ) |
|
|
|
|
{ |
|
|
|
|
vecSpot = pev->origin + Vector ( 0 , 0 , 8 );//move up a bit, and trace down.
|
|
|
|
@ -811,8 +812,8 @@ void CGib :: Spawn( const char *szGibModel )
@@ -811,8 +812,8 @@ void CGib :: Spawn( const char *szGibModel )
|
|
|
|
|
|
|
|
|
|
pev->nextthink = gpGlobals->time + 4; |
|
|
|
|
m_lifeTime = 250; |
|
|
|
|
SetThink( &WaitTillLand ); |
|
|
|
|
SetTouch( &BounceGibTouch ); |
|
|
|
|
SetThink( &CGib::WaitTillLand ); |
|
|
|
|
SetTouch( &CGib::BounceGibTouch ); |
|
|
|
|
|
|
|
|
|
m_material = matNone; |
|
|
|
|
m_cBloodDecals = 5;// how many blood decals this gib can place (1 per bounce until none remain).
|
|
|
|
|