Module core.metatables.sh_entity

Shared Entity Metafunctions.

Module Overview

Functions

meta:Distance(ent) Check scalar distance to another entity.
meta:DistToSqr(ent) Check squared scalar distance to another entity.
meta:SetColor(ctab) Overwritten SetColor function to prevent d3d signs from being made invisible.
meta:LLSpeed() Gets the Photon Speed if photon is installed, otherwise uses the same formulae that photon uses.
meta:LLSpeedKMH() kmh readout of LLSpeed

Functions

meta:Distance(ent)
Check scalar distance to another entity.

Parameters:

  • ent The entity to check distance for.

Returns:

    number The distance from the other entity
meta:DistToSqr(ent)
Check squared scalar distance to another entity.

Parameters:

  • ent The entity to check distance for.

Returns:

    number The squared distance from the other entity
meta:SetColor(ctab)
Overwritten SetColor function to prevent d3d signs from being made invisible.

Parameters:

  • ctab The colour table to be set.
meta:LLSpeed()
Gets the Photon Speed if photon is installed, otherwise uses the same formulae that photon uses.

Returns:

    number Speed in "MPH".
meta:LLSpeedKMH()
kmh readout of LLSpeed

Returns:

    number Speed in "KMH"