mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-12 03:39:10 +00:00
game(hl1): fix gibbing
This commit is contained in:
@@ -572,21 +572,23 @@ void CHL1NPCTalker::SetHeadDirection( const Vector &vTargetPos, float flInterval
|
||||
bool CHL1NPCTalker::CorpseGib( const CTakeDamageInfo &info )
|
||||
{
|
||||
CEffectData data;
|
||||
|
||||
|
||||
data.m_vOrigin = WorldSpaceCenter();
|
||||
data.m_vNormal = data.m_vOrigin - info.GetDamagePosition();
|
||||
VectorNormalize( data.m_vNormal );
|
||||
|
||||
|
||||
data.m_flScale = RemapVal( m_iHealth, 0, -500, 1, 3 );
|
||||
data.m_flScale = clamp( data.m_flScale, 1, 3 );
|
||||
|
||||
data.m_nMaterial = 1;
|
||||
data.m_nMaterial = 1;
|
||||
data.m_nHitBox = -m_iHealth;
|
||||
|
||||
data.m_nColor = BloodColor();
|
||||
|
||||
|
||||
DispatchEffect( "HL1Gib", data );
|
||||
|
||||
BaseClass::CorpseGib( info );
|
||||
|
||||
CSoundEnt::InsertSound( SOUND_MEAT, GetAbsOrigin(), 256, 0.5f, this );
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user