fix(Handling): Updated vehicle pointer continiously
Waiting for the entity id to change had bad results
This commit is contained in:
parent
50bf9f1b2b
commit
1efaa78a36
@ -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;
|
||||
else
|
||||
g_vehicle = nullptr;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user