From b3ca91e7a760f7e5bd4dfa111ae6fe7842dc0275 Mon Sep 17 00:00:00 2001 From: Rich Dunne Date: Mon, 21 Sep 2020 11:31:16 -0600 Subject: [PATCH] Fixed collector radius blip changing size on update when the player did not change the size in the menu. Added nullref checks for blips in updating the blip position. --- SceneManager/Object Classes/Waypoint.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/SceneManager/Object Classes/Waypoint.cs b/SceneManager/Object Classes/Waypoint.cs index da1882b..30a2ff5 100644 --- a/SceneManager/Object Classes/Waypoint.cs +++ b/SceneManager/Object Classes/Waypoint.cs @@ -94,7 +94,7 @@ namespace SceneManager if (CollectorRadiusBlip) { CollectorRadiusBlip.Alpha = 0.5f; - CollectorRadiusBlip.Scale = collectorRadius * 0.5f; + CollectorRadiusBlip.Scale = collectorRadius; } else { @@ -128,8 +128,14 @@ namespace SceneManager void UpdateWaypointBlipPosition() { - Blip.Position = Game.LocalPlayer.Character.Position; - CollectorRadiusBlip.Position = Game.LocalPlayer.Character.Position; + if (Blip) + { + Blip.Position = Game.LocalPlayer.Character.Position; + } + if (CollectorRadiusBlip) + { + CollectorRadiusBlip.Position = Game.LocalPlayer.Character.Position; + } } }