Skip to content

Commit

Permalink
Hotfix: Lane connector shows overlay circles for every node
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorPhilipp committed May 24, 2017
1 parent 69825dc commit 6c244e0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions TLM/TLM/UI/SubTools/LaneConnectorTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ private void ShowOverlay(bool viewOnly, RenderManager.CameraInfo cameraInfo) {
continue;
}

ItemClass connectionClass = NetManager.instance.m_nodes.m_buffer[nodeId].Info.GetConnectionClass();
if (connectionClass == null ||
!(connectionClass.m_service == ItemClass.Service.Road || (connectionClass.m_service == ItemClass.Service.PublicTransport &&
(connectionClass.m_subService == ItemClass.SubService.PublicTransportTrain ||
connectionClass.m_subService == ItemClass.SubService.PublicTransportMetro)))) {
continue;
}

var diff = NetManager.instance.m_nodes.m_buffer[nodeId].m_position - camPos;
if (diff.magnitude > TrafficManagerTool.MaxOverlayDistance)
continue; // do not draw if too distant
Expand Down

0 comments on commit 6c244e0

Please sign in to comment.