Skip to content

IOnBaseCombatEntityHurt

WARNING

This is an internal hook and will not be called in plugins. See Internal Hooks for more information.

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void IOnBaseCombatEntityHurt( BaseCombatEntity instance, HitInfo info )
{
    Puts( "IOnBaseCombatEntityHurt works!" );
}

Location

  • BaseCombatEntity::Hurt(HitInfo info)
csharp
//---
		info.damageTypes.Scale(DamageType.Bleeding, ConVar.Server.bleedingdamage);
		if (!(this is BasePlayer))
		{
			info.damageTypes.Scale(DamageType.Fun_Water, 0f);
		}
		if (Interface.CallHook("IOnBaseCombatEntityHurt", this, info) != null)
		{
			return;
		}
		this.DebugHurt(info);
		float num = info.damageTypes.Total();
//---

Released under the MIT License.