Fix Alien Grunt's TraceAttack method.
Fix extra cfg file crashing the server. Added custom blood color for monsters.
This commit is contained in:
@@ -184,13 +184,8 @@ void CMAGrunt :: TraceAttack( entvars_t *pevAttacker, float flDamage, Vector vec
|
||||
if (flDamage <= 0)
|
||||
flDamage = 0.1;// don't hurt the monster much, but allow bits_COND_LIGHT_DAMAGE to be generated
|
||||
}
|
||||
else
|
||||
{
|
||||
SpawnBlood(ptr->vecEndPos, BloodColor(), flDamage);// a little surface blood.
|
||||
TraceBleed( flDamage, vecDir, ptr, bitsDamageType );
|
||||
}
|
||||
|
||||
AddMultiDamage( pevAttacker, this->edict(), flDamage, bitsDamageType );
|
||||
|
||||
CMBaseMonster::TraceAttack(pevAttacker, flDamage, vecDir, ptr, bitsDamageType);
|
||||
}
|
||||
|
||||
//=========================================================
|
||||
@@ -537,7 +532,7 @@ void CMAGrunt :: Spawn()
|
||||
|
||||
pev->solid = SOLID_SLIDEBOX;
|
||||
pev->movetype = MOVETYPE_STEP;
|
||||
m_bloodColor = BLOOD_COLOR_GREEN;
|
||||
m_bloodColor = !m_bloodColor ? BLOOD_COLOR_YELLOW : m_bloodColor;
|
||||
pev->effects = 0;
|
||||
pev->health = gSkillData.agruntHealth;
|
||||
m_flFieldOfView = 0.2;// indicates the width of this monster's forward view cone ( as a dotproduct result )
|
||||
|
||||
Reference in New Issue
Block a user