OnEntityLeave
Usage
- Return a non-null value to override default behavior
Example Autogenerated
csharp
private void OnEntityLeave( TriggerBase instance, BaseEntity ent )
{
Puts( "OnEntityLeave works!" );
}
csharp
private void OnEntityLeave( TriggerComfort instance, BaseEntity ent )
{
Puts( "OnEntityLeave works!" );
}
Location
- TriggerBase::OnEntityLeave(BaseEntity ent)
- TriggerComfort::OnEntityLeave(BaseEntity ent)
csharp
//---
{
if (this.entityContents == null)
{
return;
}
if (Interface.CallHook("OnEntityLeave", this, ent) != null)
{
return;
}
this.entityContents.Remove(ent);
Action<BaseNetworkable> expr_2C = this.OnEntityLeaveTrigger;
//---
csharp
//---
BasePlayer basePlayer = ent as BasePlayer;
if (!basePlayer)
{
return;
}
if (Interface.CallHook("OnEntityLeave", this, ent) != null)
{
return;
}
this._players.Remove(basePlayer);
}