Fixed tons of monsters not working/crashing when attacking HL monsters.
This commit is contained in:
@@ -113,7 +113,7 @@ void CSquidSpit::Shoot( entvars_t *pevOwner, Vector vecStart, Vector vecVelocity
|
|||||||
|
|
||||||
pSpit->SetThink ( &CSquidSpit::Animate );
|
pSpit->SetThink ( &CSquidSpit::Animate );
|
||||||
pSpit->pev->nextthink = gpGlobals->time + 0.1;
|
pSpit->pev->nextthink = gpGlobals->time + 0.1;
|
||||||
pSpit->SetTouch ( &CSquidSpit::SpitTouch );
|
pSpit->SetTouch ( &CSquidSpit::SpitTouch );
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSquidSpit :: SpitTouch ( edict_t *pOther )
|
void CSquidSpit :: SpitTouch ( edict_t *pOther )
|
||||||
@@ -166,6 +166,8 @@ void CSquidSpit :: SpitTouch ( edict_t *pOther )
|
|||||||
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(pOther));
|
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(pOther));
|
||||||
pMonster->TakeDamage ( pev, pev, gSkillData.bullsquidDmgSpit, DMG_GENERIC );
|
pMonster->TakeDamage ( pev, pev, gSkillData.bullsquidDmgSpit, DMG_GENERIC );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
UTIL_TakeDamageExternal( pOther, pev, pev, gSkillData.bullsquidDmgSpit, DMG_GENERIC );
|
||||||
}
|
}
|
||||||
|
|
||||||
SetThink ( &CSquidSpit::SUB_Remove );
|
SetThink ( &CSquidSpit::SUB_Remove );
|
||||||
|
|||||||
@@ -1185,6 +1185,8 @@ void CMControllerHeadBall :: HuntThink( void )
|
|||||||
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(tr.pHit));
|
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(tr.pHit));
|
||||||
pMonster->TraceAttack( VARS(m_hOwner), gSkillData.controllerDmgZap, pev->velocity, &tr, DMG_SHOCK );
|
pMonster->TraceAttack( VARS(m_hOwner), gSkillData.controllerDmgZap, pev->velocity, &tr, DMG_SHOCK );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
UTIL_TraceAttack( tr.pHit, VARS(m_hOwner), gSkillData.controllerDmgZap, pev->velocity, &tr, DMG_SHOCK );
|
||||||
|
|
||||||
ApplyMultiDamage( pev, VARS(m_hOwner) );
|
ApplyMultiDamage( pev, VARS(m_hOwner) );
|
||||||
}
|
}
|
||||||
@@ -1361,6 +1363,8 @@ void CMControllerZapBall::ExplodeTouch( edict_t *pOther )
|
|||||||
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(pOther));
|
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(pOther));
|
||||||
pMonster->TraceAttack(pevOwner, gSkillData.controllerDmgBall, pev->velocity.Normalize(), &tr, DMG_ENERGYBEAM );
|
pMonster->TraceAttack(pevOwner, gSkillData.controllerDmgBall, pev->velocity.Normalize(), &tr, DMG_ENERGYBEAM );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
UTIL_TraceAttack(pOther, pevOwner, gSkillData.controllerDmgBall, pev->velocity.Normalize(), &tr, DMG_ENERGYBEAM );
|
||||||
ApplyMultiDamage( pevOwner, pevOwner );
|
ApplyMultiDamage( pevOwner, pevOwner );
|
||||||
|
|
||||||
UTIL_EmitAmbientSound( ENT(pev), tr.vecEndPos, "weapons/electro4.wav", 0.3, ATTN_NORM, 0, RANDOM_LONG( 90, 99 ) );
|
UTIL_EmitAmbientSound( ENT(pev), tr.vecEndPos, "weapons/electro4.wav", 0.3, ATTN_NORM, 0, RANDOM_LONG( 90, 99 ) );
|
||||||
|
|||||||
@@ -130,13 +130,23 @@ void CStomp::Think( void )
|
|||||||
|
|
||||||
if ( tr.pHit && tr.pHit != pev->owner )
|
if ( tr.pHit && tr.pHit != pev->owner )
|
||||||
{
|
{
|
||||||
CMBaseEntity *pEntity = CMBaseEntity::Instance( tr.pHit );
|
edict_t *pEntity = tr.pHit;
|
||||||
entvars_t *pevOwner = pev;
|
entvars_t *pevOwner = pev;
|
||||||
if ( pev->owner )
|
if ( pev->owner )
|
||||||
pevOwner = VARS(pev->owner);
|
pevOwner = VARS(pev->owner);
|
||||||
|
|
||||||
if ( pEntity )
|
if (pEntity->v.takedamage)
|
||||||
pEntity->TakeDamage( pev, pevOwner, pev->dmg, DMG_SONIC );
|
{
|
||||||
|
if (UTIL_IsPlayer(pEntity))
|
||||||
|
UTIL_TakeDamage(pEntity, pev, pevOwner, pev->dmg, DMG_SONIC);
|
||||||
|
else if (pEntity->v.euser4 != NULL)
|
||||||
|
{
|
||||||
|
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(pEntity));
|
||||||
|
pMonster->TakeDamage(pev, pevOwner, pev->dmg, DMG_SONIC);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
UTIL_TakeDamageExternal(pEntity, pev, pevOwner, pev->dmg, DMG_SONIC);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Accelerate the effect
|
// Accelerate the effect
|
||||||
@@ -564,6 +574,8 @@ void CMGargantua :: FlameDamage( Vector vecStart, Vector vecEnd, entvars_t *pevI
|
|||||||
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(pEntity));
|
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(pEntity));
|
||||||
pMonster->TraceAttack( pevInflictor, flAdjustedDamage, (tr.vecEndPos - vecSrc).Normalize(), &tr, bitsDamageType );
|
pMonster->TraceAttack( pevInflictor, flAdjustedDamage, (tr.vecEndPos - vecSrc).Normalize(), &tr, bitsDamageType );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
UTIL_TraceAttack( pEntity, pevInflictor, flAdjustedDamage, (tr.vecEndPos - vecSrc).Normalize(), &tr, bitsDamageType );
|
||||||
ApplyMultiDamage( pevInflictor, pevAttacker );
|
ApplyMultiDamage( pevInflictor, pevAttacker );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -575,6 +587,8 @@ void CMGargantua :: FlameDamage( Vector vecStart, Vector vecEnd, entvars_t *pevI
|
|||||||
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(pEntity));
|
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(pEntity));
|
||||||
pMonster->TakeDamage( pevInflictor, pevAttacker, flAdjustedDamage, bitsDamageType );
|
pMonster->TakeDamage( pevInflictor, pevAttacker, flAdjustedDamage, bitsDamageType );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
UTIL_TakeDamageExternal( pEntity, pevInflictor, pevAttacker, flAdjustedDamage, bitsDamageType );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -976,6 +990,8 @@ edict_t *CMGargantua::GargantuaCheckTraceHullAttack(float flDist, int iDamage, i
|
|||||||
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(tr.pHit));
|
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(tr.pHit));
|
||||||
pMonster->TakeDamage( pev, pev, iDamage, iDmgType );
|
pMonster->TakeDamage( pev, pev, iDamage, iDmgType );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
UTIL_TakeDamageExternal( tr.pHit, pev, pev, iDamage, iDmgType );
|
||||||
}
|
}
|
||||||
|
|
||||||
return tr.pHit;
|
return tr.pHit;
|
||||||
@@ -1791,6 +1807,8 @@ edict_t *CMBabyGargantua::BabyGargCheckTraceHullAttack(float flDist, int iDamage
|
|||||||
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(tr.pHit));
|
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(tr.pHit));
|
||||||
pMonster->TakeDamage( pev, pev, iDamage, iDmgType );
|
pMonster->TakeDamage( pev, pev, iDamage, iDmgType );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
UTIL_TakeDamageExternal( tr.pHit, pev, pev, iDamage, iDmgType );
|
||||||
}
|
}
|
||||||
|
|
||||||
return tr.pHit;
|
return tr.pHit;
|
||||||
|
|||||||
@@ -227,13 +227,15 @@ void CMGrenade::BounceTouch( edict_t *pOther )
|
|||||||
TraceResult tr = UTIL_GetGlobalTrace( );
|
TraceResult tr = UTIL_GetGlobalTrace( );
|
||||||
ClearMultiDamage( );
|
ClearMultiDamage( );
|
||||||
|
|
||||||
if (UTIL_IsPlayer(pOther))
|
if (UTIL_IsPlayer(pOther))
|
||||||
UTIL_TraceAttack(pOther, pevOwner, 1, gpGlobals->v_forward, &tr, DMG_CLUB );
|
UTIL_TraceAttack(pOther, pevOwner, 1, gpGlobals->v_forward, &tr, DMG_CLUB );
|
||||||
else if (pOther->v.euser4 != NULL)
|
else if (pOther->v.euser4 != NULL)
|
||||||
{
|
{
|
||||||
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(pOther));
|
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(pOther));
|
||||||
pMonster->TraceAttack(pevOwner, 1, gpGlobals->v_forward, &tr, DMG_CLUB );
|
pMonster->TraceAttack(pevOwner, 1, gpGlobals->v_forward, &tr, DMG_CLUB );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
UTIL_TraceAttack(pOther, pevOwner, 1, gpGlobals->v_forward, &tr, DMG_CLUB); // lmao
|
||||||
|
|
||||||
ApplyMultiDamage( pev, pevOwner);
|
ApplyMultiDamage( pev, pevOwner);
|
||||||
}
|
}
|
||||||
@@ -277,7 +279,6 @@ void CMGrenade::BounceTouch( edict_t *pOther )
|
|||||||
pev->framerate = 1;
|
pev->framerate = 1;
|
||||||
else if (pev->framerate < 0.5)
|
else if (pev->framerate < 0.5)
|
||||||
pev->framerate = 0;
|
pev->framerate = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -134,12 +134,14 @@ void CGonomeGuts :: GutsTouch( edict_t *pOther )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (UTIL_IsPlayer(pOther))
|
if (UTIL_IsPlayer(pOther))
|
||||||
UTIL_TakeDamage( pOther, pev, pev, gSkillData.gonomeDmgGuts, DMG_GENERIC );
|
UTIL_TakeDamage( pOther, pev, VARS(pev->owner), gSkillData.gonomeDmgGuts, DMG_GENERIC );
|
||||||
else if (pOther->v.euser4 != NULL)
|
else if (pOther->v.euser4 != NULL)
|
||||||
{
|
{
|
||||||
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(pOther));
|
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(pOther));
|
||||||
pMonster->TakeDamage ( pev, pev, gSkillData.gonomeDmgGuts, DMG_GENERIC );
|
pMonster->TakeDamage ( pev, VARS(pev->owner), gSkillData.gonomeDmgGuts, DMG_GENERIC );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
UTIL_TakeDamageExternal( pOther, pev, VARS(pev->owner), gSkillData.gonomeDmgGuts, DMG_GENERIC );
|
||||||
}
|
}
|
||||||
|
|
||||||
SetThink( &CGonomeGuts::SUB_Remove );
|
SetThink( &CGonomeGuts::SUB_Remove );
|
||||||
|
|||||||
@@ -524,7 +524,8 @@ void CMHoundeye :: SonicAttack ( void )
|
|||||||
{
|
{
|
||||||
if ( pEntity->v.takedamage != DAMAGE_NO )
|
if ( pEntity->v.takedamage != DAMAGE_NO )
|
||||||
{
|
{
|
||||||
if ( strcmp(STRING(pEntity->v.model), "models/houndeye.mdl") != 0 )
|
// don't compare by model because a mapper might change it
|
||||||
|
if ( strcmp(STRING(pEntity->v.classname), "monster_houndeye") != 0 )
|
||||||
{// houndeyes don't hurt other houndeyes with their attack
|
{// houndeyes don't hurt other houndeyes with their attack
|
||||||
|
|
||||||
// houndeyes do FULL damage if the ent in question is visible. Half damage otherwise.
|
// houndeyes do FULL damage if the ent in question is visible. Half damage otherwise.
|
||||||
@@ -565,6 +566,8 @@ void CMHoundeye :: SonicAttack ( void )
|
|||||||
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(pEntity));
|
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(pEntity));
|
||||||
pMonster->TakeDamage( pev, pev, flAdjustedDamage, DMG_SONIC | DMG_ALWAYSGIB );
|
pMonster->TakeDamage( pev, pev, flAdjustedDamage, DMG_SONIC | DMG_ALWAYSGIB );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
UTIL_TakeDamageExternal( pEntity, pev, pev, flAdjustedDamage, DMG_SONIC | DMG_ALWAYSGIB );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -737,6 +737,8 @@ void CMISlave :: ZapBeam( int side )
|
|||||||
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(pEntity));
|
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(pEntity));
|
||||||
pMonster->TraceAttack( pev, gSkillData.slaveDmgZap, vecAim, &tr, DMG_SHOCK );
|
pMonster->TraceAttack( pev, gSkillData.slaveDmgZap, vecAim, &tr, DMG_SHOCK );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
UTIL_TraceAttack( pEntity, pev, gSkillData.slaveDmgZap, vecAim, &tr, DMG_SHOCK );
|
||||||
}
|
}
|
||||||
|
|
||||||
UTIL_EmitAmbientSound( ENT(pev), tr.vecEndPos, "weapons/electro4.wav", 0.5, ATTN_NORM, 0, RANDOM_LONG( 140, 160 ) );
|
UTIL_EmitAmbientSound( ENT(pev), tr.vecEndPos, "weapons/electro4.wav", 0.5, ATTN_NORM, 0, RANDOM_LONG( 140, 160 ) );
|
||||||
|
|||||||
@@ -97,7 +97,9 @@ void CPitdroneSpike::SpikeTouch(edict_t *pOther)
|
|||||||
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(pOther));
|
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(pOther));
|
||||||
pMonster->TakeDamage( pev, pevOwner, gSkillData.pitdroneDmgSpit, DMG_GENERIC | DMG_NEVERGIB );
|
pMonster->TakeDamage( pev, pevOwner, gSkillData.pitdroneDmgSpit, DMG_GENERIC | DMG_NEVERGIB );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
UTIL_TakeDamageExternal( pOther, pev, pevOwner, gSkillData.pitdroneDmgSpit, DMG_GENERIC | DMG_NEVERGIB );
|
||||||
|
|
||||||
if (RANDOM_LONG(0,1))
|
if (RANDOM_LONG(0,1))
|
||||||
EMIT_SOUND_DYN(ENT(pev), CHAN_WEAPON, "weapons/xbow_hitbod1.wav", 1, ATTN_NORM, 0, iPitch);
|
EMIT_SOUND_DYN(ENT(pev), CHAN_WEAPON, "weapons/xbow_hitbod1.wav", 1, ATTN_NORM, 0, iPitch);
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -142,7 +142,9 @@ void CMShock::Touch(edict_t *pOther)
|
|||||||
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(pOther));
|
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(pOther));
|
||||||
pMonster->TraceAttack( pevAttacker, pev->dmg, pev->velocity.Normalize(), &tr, damageType );
|
pMonster->TraceAttack( pevAttacker, pev->dmg, pev->velocity.Normalize(), &tr, damageType );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
UTIL_TraceAttack( pOther, pevAttacker, pev->dmg, pev->velocity.Normalize(), &tr, damageType );
|
||||||
|
|
||||||
ApplyMultiDamage(pev, pevAttacker);
|
ApplyMultiDamage(pev, pevAttacker);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -131,6 +131,8 @@ void CMShockRoach::LeapTouch(edict_t *pOther)
|
|||||||
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(pOther));
|
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(pOther));
|
||||||
pMonster->TakeDamage( pev, pev, GetDamageAmount(), DMG_SLASH );
|
pMonster->TakeDamage( pev, pev, GetDamageAmount(), DMG_SLASH );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
UTIL_TakeDamageExternal( pOther, pev, pev, GetDamageAmount(), DMG_SLASH );
|
||||||
}
|
}
|
||||||
|
|
||||||
SetTouch(NULL);
|
SetTouch(NULL);
|
||||||
|
|||||||
@@ -295,13 +295,15 @@ void CMSqueakGrenade::SuperBounceTouch( edict_t *pOther )
|
|||||||
// ALERT( at_console, "hit enemy\n");
|
// ALERT( at_console, "hit enemy\n");
|
||||||
ClearMultiDamage( );
|
ClearMultiDamage( );
|
||||||
|
|
||||||
if (UTIL_IsPlayer(pOther))
|
if (UTIL_IsPlayer(pOther))
|
||||||
UTIL_TraceAttack(pOther, pev, gSkillData.snarkDmgBite, gpGlobals->v_forward, &tr, DMG_SLASH );
|
UTIL_TraceAttack(pOther, pev, gSkillData.snarkDmgBite, gpGlobals->v_forward, &tr, DMG_SLASH );
|
||||||
else if (pOther->v.euser4 != NULL)
|
else if (pOther->v.euser4 != NULL)
|
||||||
{
|
{
|
||||||
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(pOther));
|
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(pOther));
|
||||||
pMonster->TraceAttack(pev, gSkillData.snarkDmgBite, gpGlobals->v_forward, &tr, DMG_SLASH );
|
pMonster->TraceAttack(pev, gSkillData.snarkDmgBite, gpGlobals->v_forward, &tr, DMG_SLASH );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
UTIL_TraceAttack(pOther, pev, gSkillData.snarkDmgBite, gpGlobals->v_forward, &tr, DMG_SLASH );
|
||||||
|
|
||||||
ApplyMultiDamage( pev, pev );
|
ApplyMultiDamage( pev, pev );
|
||||||
|
|
||||||
|
|||||||
@@ -330,6 +330,8 @@ void CMStrooper::HandleAnimEvent(MonsterEvent_t *pEvent)
|
|||||||
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(pHurt));
|
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(pHurt));
|
||||||
pMonster->TakeDamage( pev, pev, gSkillData.strooperDmgKick, DMG_CLUB );
|
pMonster->TakeDamage( pev, pev, gSkillData.strooperDmgKick, DMG_CLUB );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
UTIL_TakeDamageExternal( pHurt, pev, pev, gSkillData.strooperDmgKick, DMG_CLUB );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_fRightClaw = !m_fRightClaw;
|
m_fRightClaw = !m_fRightClaw;
|
||||||
|
|||||||
@@ -127,6 +127,8 @@ void CMVoltigoreEnergyBall::BallTouch(edict_t *pOther)
|
|||||||
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(pOther));
|
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(pOther));
|
||||||
pMonster->TakeDamage( pev, VARS( pev->owner ), gSkillData.voltigoreDmgBeam, DMG_SHOCK|DMG_ALWAYSGIB );
|
pMonster->TakeDamage( pev, VARS( pev->owner ), gSkillData.voltigoreDmgBeam, DMG_SHOCK|DMG_ALWAYSGIB );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
UTIL_TakeDamageExternal( pOther, pev, VARS(pev->owner), gSkillData.voltigoreDmgBeam, DMG_SHOCK | DMG_ALWAYSGIB );
|
||||||
}
|
}
|
||||||
pev->velocity = Vector(0,0,0);
|
pev->velocity = Vector(0,0,0);
|
||||||
|
|
||||||
@@ -154,6 +156,8 @@ void CMVoltigoreEnergyBall::FlyThink(void)
|
|||||||
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(pEntity));
|
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(pEntity));
|
||||||
pMonster->TakeDamage( pev, pev, gSkillData.voltigoreDmgBeam/5, DMG_SHOCK );
|
pMonster->TakeDamage( pev, pev, gSkillData.voltigoreDmgBeam/5, DMG_SHOCK );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
UTIL_TakeDamageExternal( pEntity, pev, pev, gSkillData.voltigoreDmgBeam / 5, DMG_SHOCK );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -387,7 +391,7 @@ BOOL CMVoltigore::CheckRangeAttack1(float flDot, float flDist)
|
|||||||
{
|
{
|
||||||
if (IsMoving() && flDist >= 512)
|
if (IsMoving() && flDist >= 512)
|
||||||
{
|
{
|
||||||
// voltigore will far too far behind if he stops running to spit at this distance from the enemy.
|
// voltigore will far too far behind if he stops running to spit at this distance from the enemy.
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1020,6 +1024,8 @@ void CMVoltigore::GibBeamDamage()
|
|||||||
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(pEntity));
|
CMBaseMonster *pMonster = GetClassPtr((CMBaseMonster *)VARS(pEntity));
|
||||||
pMonster->TakeDamage( pev, pev, flAdjustedDamage, DMG_SHOCK );
|
pMonster->TakeDamage( pev, pev, flAdjustedDamage, DMG_SHOCK );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
UTIL_TakeDamageExternal( pEntity, pev, pev, flAdjustedDamage, DMG_SHOCK );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user