IOnBasePlayerHurt
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 object IOnBasePlayerHurt( BasePlayer instance, HitInfo info )
{
Puts( "IOnBasePlayerHurt works!" );
return null;
}Location
- BasePlayer::Hurt(HitInfo info)
csharp
public override void Hurt(HitInfo info)
{
if (IsDead() || IsTransferProtected() || (IsImmortalTo(info) && info.damageTypes.Total() >= 0f) || Interface.CallHook("IOnBasePlayerHurt", this, info) != null)
{
return;
}
bool wasWounded = IsWounded();
if (ConVar.Server.pve && !IsNpc && (bool)info.Initiator && info.Initiator is BasePlayer && info.Initiator != this)
//---