Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
I return after update to avoid exception.
  • Loading branch information
kianzarrin committed Feb 26, 2020
1 parent 13ca9b8 commit 2414315
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions TLM/TLM/UI/SubTools/VehicleRestrictionsTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ public override void ShowGUIOverlay(ToolMode toolMode, bool viewOnly) {
private void ShowSigns(bool viewOnly) {
Vector3 camPos = Camera.main.transform.position;
NetManager netManager = Singleton<NetManager>.instance;
ushort updatedSegmentId = 0;
bool handleHovered = false;

foreach (ushort segmentId in currentRestrictedSegmentIds) {
Expand Down Expand Up @@ -248,15 +247,11 @@ private void ShowSigns(bool viewOnly) {
}

if (update) {
updatedSegmentId = segmentId;
break;
}
}

overlayHandleHovered = handleHovered;

if (updatedSegmentId != 0) {
RefreshCurrentRestrictedSegmentIds(updatedSegmentId);
}
}

private void GuiVehicleRestrictionsWindow(int num) {
Expand Down Expand Up @@ -581,7 +576,7 @@ private bool DrawVehicleRestrictionHandles(ushort segmentId,
vehicleType,
!allowed);
stateUpdated = true;

RefreshCurrentRestrictedSegmentIds(segmentId);
if (RoadMode) {
ApplyRestrictionsToAllSegments(sortedLaneIndex, vehicleType);
}
Expand Down

0 comments on commit 2414315

Please sign in to comment.