Start making monstermod aware of normal HL monsters.
This is still heavily experimental and its use is not yet recommended.
This commit is contained in:
@@ -1807,7 +1807,7 @@ int UTIL_TakeDamage( edict_t *pEdict, entvars_t *pevInflictor, entvars_t *pevAtt
|
||||
WRITE_COORD( pevInflictor->origin.z );
|
||||
MESSAGE_END();
|
||||
}
|
||||
|
||||
|
||||
return fTookDamage;
|
||||
}
|
||||
|
||||
@@ -1888,7 +1888,7 @@ void UTIL_TraceAttack( edict_t *pEdict, entvars_t *pevAttacker, float flDamage,
|
||||
{
|
||||
AddMultiDamage( pevAttacker, pEdict, flDamage, bitsDamageType );
|
||||
|
||||
SpawnBlood(ptr->vecEndPos, BLOOD_COLOR_RED, flDamage);// a little surface blood.
|
||||
SpawnBlood(ptr->vecEndPos, BLOOD_COLOR_RED, flDamage);// a little surface blood.
|
||||
|
||||
UTIL_TraceBleed( pEdict, flDamage, vecDir, ptr, bitsDamageType );
|
||||
}
|
||||
@@ -1968,3 +1968,11 @@ bool UTIL_IsBSPModel( edict_t *pent )
|
||||
{
|
||||
return (pent->v.solid == SOLID_BSP || pent->v.movetype == MOVETYPE_PUSHSTEP);
|
||||
}
|
||||
|
||||
void UTIL_TakeDamageExternal( edict_t *pEdict, entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType )
|
||||
{
|
||||
// Tell AMXX to call TakeDamage for us.
|
||||
char extCmd[64];
|
||||
sprintf( extCmd, "monster_hurt_entity %i %i %i %f %i\n", ENTINDEX( pEdict ), ENTINDEX( ENT( pevInflictor ) ), ENTINDEX( ENT( pevAttacker ) ), flDamage, bitsDamageType );
|
||||
SERVER_COMMAND( extCmd );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user