mirror of
https://github.com/nillerusr/source-engine.git
synced 2025-01-25 22:34:25 +00:00
game(hl1): fix gibbing
This commit is contained in:
parent
fafc3554a5
commit
216bbf1baa
@ -180,7 +180,7 @@ bool CHL1BaseNPC::CorpseGib( const CTakeDamageInfo &info )
|
|||||||
|
|
||||||
CSoundEnt::InsertSound( SOUND_MEAT, GetAbsOrigin(), 256, 0.5f, this );
|
CSoundEnt::InsertSound( SOUND_MEAT, GetAbsOrigin(), 256, 0.5f, this );
|
||||||
|
|
||||||
/// BaseClass::CorpseGib( info );
|
BaseClass::CorpseGib( info );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1587,7 +1587,7 @@ void CHL1Gib::Spawn( const char *szGibModel )
|
|||||||
|
|
||||||
SetNextThink( gpGlobals->curtime + 4 );
|
SetNextThink( gpGlobals->curtime + 4 );
|
||||||
|
|
||||||
m_lifeTime = 25;
|
m_lifeTime = 250;
|
||||||
|
|
||||||
SetThink ( &CHL1Gib::WaitTillLand );
|
SetThink ( &CHL1Gib::WaitTillLand );
|
||||||
SetTouch ( &CHL1Gib::BounceGibTouch );
|
SetTouch ( &CHL1Gib::BounceGibTouch );
|
||||||
|
@ -487,10 +487,10 @@ int CNPC_HGrunt::SquadRecruit( int searchRadius, int maxMembers )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
static char szSquadName[64];
|
char szSquadName[64];
|
||||||
Q_snprintf( szSquadName, sizeof( szSquadName ), "squad%d\n", g_iSquadIndex );
|
Q_snprintf( szSquadName, sizeof( szSquadName ), "squad%d\n", g_iSquadIndex );
|
||||||
|
|
||||||
m_SquadName = MAKE_STRING( szSquadName );
|
m_SquadName = AllocPooledString( szSquadName );
|
||||||
|
|
||||||
while ( ( pEntity = gEntList.FindEntityInSphere( pEntity, GetAbsOrigin(), searchRadius ) ) != NULL )
|
while ( ( pEntity = gEntList.FindEntityInSphere( pEntity, GetAbsOrigin(), searchRadius ) ) != NULL )
|
||||||
{
|
{
|
||||||
|
@ -994,10 +994,10 @@ int CNPC_Houndeye::SquadRecruit( int searchRadius, int maxMembers )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
static char szSquadName[64];
|
char szSquadName[64];
|
||||||
Q_snprintf( szSquadName, sizeof( szSquadName ), "squad%d\n", s_iSquadIndex );
|
Q_snprintf( szSquadName, sizeof( szSquadName ), "squad%d\n", s_iSquadIndex );
|
||||||
|
|
||||||
m_SquadName = MAKE_STRING( szSquadName );
|
m_SquadName = AllocPooledString( szSquadName );
|
||||||
|
|
||||||
while ( ( pEntity = gEntList.FindEntityInSphere( pEntity, GetAbsOrigin(), searchRadius ) ) != NULL && squadCount < maxMembers )
|
while ( ( pEntity = gEntList.FindEntityInSphere( pEntity, GetAbsOrigin(), searchRadius ) ) != NULL && squadCount < maxMembers )
|
||||||
{
|
{
|
||||||
|
@ -572,21 +572,23 @@ void CHL1NPCTalker::SetHeadDirection( const Vector &vTargetPos, float flInterval
|
|||||||
bool CHL1NPCTalker::CorpseGib( const CTakeDamageInfo &info )
|
bool CHL1NPCTalker::CorpseGib( const CTakeDamageInfo &info )
|
||||||
{
|
{
|
||||||
CEffectData data;
|
CEffectData data;
|
||||||
|
|
||||||
data.m_vOrigin = WorldSpaceCenter();
|
data.m_vOrigin = WorldSpaceCenter();
|
||||||
data.m_vNormal = data.m_vOrigin - info.GetDamagePosition();
|
data.m_vNormal = data.m_vOrigin - info.GetDamagePosition();
|
||||||
VectorNormalize( data.m_vNormal );
|
VectorNormalize( data.m_vNormal );
|
||||||
|
|
||||||
data.m_flScale = RemapVal( m_iHealth, 0, -500, 1, 3 );
|
data.m_flScale = RemapVal( m_iHealth, 0, -500, 1, 3 );
|
||||||
data.m_flScale = clamp( data.m_flScale, 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_nHitBox = -m_iHealth;
|
||||||
|
|
||||||
data.m_nColor = BloodColor();
|
data.m_nColor = BloodColor();
|
||||||
|
|
||||||
DispatchEffect( "HL1Gib", data );
|
DispatchEffect( "HL1Gib", data );
|
||||||
|
|
||||||
|
BaseClass::CorpseGib( info );
|
||||||
|
|
||||||
CSoundEnt::InsertSound( SOUND_MEAT, GetAbsOrigin(), 256, 0.5f, this );
|
CSoundEnt::InsertSound( SOUND_MEAT, GetAbsOrigin(), 256, 0.5f, this );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user