From 1cb71d3d745e7b83bd9ca392c1089b19c02cef05 Mon Sep 17 00:00:00 2001 From: Razzie Date: Thu, 18 Jul 2019 21:08:28 +0200 Subject: [PATCH] Checking horizontal distance only when moving props --- Client/Props.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Client/Props.cs b/Client/Props.cs index 232f6838..d371de2e 100644 --- a/Client/Props.cs +++ b/Client/Props.cs @@ -186,13 +186,13 @@ private static Task Update() return Delay(1000); var player = API.GetPlayerPed(-1); - var coords = API.GetEntityCoords(player, true); + var coords = (Vector2)API.GetEntityCoords(player, true); var prop = _props[_props.Count - 1]; var pos = API.GetEntityCoords(prop, false); var rotation = API.GetEntityRotation(prop, 0); - if (coords.DistanceToSquared(pos) < 100f) + if (Vector2.DistanceSquared(coords, (Vector2)pos) < 100f) { if (API.IsControlPressed(0, 172)) // up API.SetEntityCoords(prop, pos.X, pos.Y, pos.Z + 0.01f, false, false, true, false);