From 1efaa78a36297cfcde900cdaf69f9e67e959ac4f Mon Sep 17 00:00:00 2001 From: Yimura Date: Fri, 19 Feb 2021 15:41:10 +0100 Subject: [PATCH] fix(Handling): Updated vehicle pointer continiously Waiting for the entity id to change had bad results --- .../src/features/looped/vehicle/handling.cpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/BigBaseV2/src/features/looped/vehicle/handling.cpp b/BigBaseV2/src/features/looped/vehicle/handling.cpp index d7aea8e9..d049b2a7 100644 --- a/BigBaseV2/src/features/looped/vehicle/handling.cpp +++ b/BigBaseV2/src/features/looped/vehicle/handling.cpp @@ -4,7 +4,7 @@ namespace big { - static Vehicle veh = -1; + //static Vehicle veh = -1; void vehicle::handling() { @@ -13,16 +13,8 @@ namespace big g_temp.in_vehicle = ped->m_in_vehicle == 0; if (g_temp.in_vehicle) - { - Vehicle currVeh = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false); - if (veh != currVeh && ped->m_vehicle != nullptr) - { - veh = currVeh; - - // Copy the new vehicle data to our global - g_vehicle = ped->m_vehicle; - } - } - else g_vehicle = nullptr; + g_vehicle = ped->m_vehicle; + else + g_vehicle = nullptr; } } \ No newline at end of file