Garry's Mod Wiki

CNavArea:GetIncomingConnectionDistances

  table CNavArea:GetIncomingConnectionDistances( number dir = nil )

Description

Returns a table of all the CNavAreas that have a one-way connection to this CNavArea and their pre-computed distances.

If a CNavArea has a two-way connection to or from this CNavArea then it will not be returned from this function, use CNavArea:GetAdjacentAreaDistances to get outgoing (one and two way) connections.

Arguments

1 number dir = nil
If set, will only return areas in the specified direction. See NAVDIR enum.

Returns

1 table
A list of tables in the following format:
  • CNavArea area - the area that is connected to this area.
  • number dist - Distance from the area to this area.
  • number dir - Direction in which the area is in relative to this area.