Garry's Mod Wiki

CNavArea:GetAdjacentAreas

  table CNavArea:GetAdjacentAreas()

Description

Returns a list of all the CNavAreas that have a (one and two way) connection from this CNavArea.

If an area has a one-way incoming connection to this CNavArea, then it will not be returned from this function, use CNavArea:GetIncomingConnections to get all one-way incoming connections.

See CNavArea:GetAdjacentAreasAtSide for a function that only returns areas from one side/direction.

Returns

1 table
A list of all CNavArea that have a (one and two way) connection from this CNavArea.

Returns an empty table if this area has no outgoing connections to any other areas.