OnEntityMarkHostile
Usage
- Return a non-null value to override default behavior
Example Autogenerated
csharp
private void OnEntityMarkHostile( BaseCombatEntity instance, float duration )
{
Puts( "OnEntityMarkHostile works!" );
}
csharp
private void OnEntityMarkHostile( BasePlayer instance, float duration )
{
Puts( "OnEntityMarkHostile works!" );
}
Location
- BaseCombatEntity::MarkHostileFor(float duration)
- BasePlayer::MarkHostileFor(float duration)
csharp
public virtual void MarkHostileFor(float duration = 60f)
{
if (Interface.CallHook("OnEntityMarkHostile", this, duration) != null)
{
return;
}
float b = Time.realtimeSinceStartup + duration;
this.unHostileTime = Mathf.Max(this.unHostileTime, b);
//---
csharp
public override void MarkHostileFor(float duration = 60f)
{
if (Interface.CallHook("OnEntityMarkHostile", this, duration) != null)
{
return;
}
double currentTimestamp = TimeEx.currentTimestamp;
double val = currentTimestamp + (double)duration;
//---