OnEntityDistanceCheck
Usage
- Return a non-null value to override default behavior
Example Autogenerated
csharp
private void OnEntityDistanceCheck( BaseEntity ent, BasePlayer player, uint id, string debugName, float maximumDistance, bool checkParent )
{
Puts( "OnEntityDistanceCheck works!" );
}
Location
- BaseEntity/RPC_Server/MaxDistance::Test(uint id, string debugName, BaseEntity ent, BasePlayer player, float maximumDistance, bool checkParent)
csharp
//---
{
if (ent == null || player == null)
{
return false;
}
object returnvar = Interface.CallHook("OnEntityDistanceCheck", ent, player, id, debugName, maximumDistance, checkParent);
if (returnvar is bool)
{
return (bool)returnvar;
}
bool flag = ent.Distance(player.eyes.position) <= maximumDistance;
//---