mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-17 06:47:22 +08:00
fix(Handling): Updated vehicle pointer continiously
Waiting for the entity id to change had bad results
This commit is contained in:
parent
7d3b71efb6
commit
b3e049ef88
@ -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;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user