Fixed vehicle repaired/vehicle godmode code not running if the player was offline/did not have a personal vehicle deployed.
This commit is contained in:
parent
c59a0ff948
commit
0217c5e281
@ -18,10 +18,13 @@ namespace big
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (*g_pointers->m_gta.m_is_session_started)
|
||||||
|
{
|
||||||
if (!entity::take_control_of(veh, 0))
|
if (!entity::take_control_of(veh, 0))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (VEHICLE::GET_DOES_VEHICLE_HAVE_DAMAGE_DECALS(veh))
|
if (VEHICLE::GET_DOES_VEHICLE_HAVE_DAMAGE_DECALS(veh))
|
||||||
{
|
{
|
||||||
|
@ -95,11 +95,12 @@ namespace big
|
|||||||
{
|
{
|
||||||
if (g_local_player)
|
if (g_local_player)
|
||||||
{
|
{
|
||||||
if (const auto personal_vehicle = mobile::mechanic::get_personal_cvehicle())
|
const auto personal_vehicle = mobile::mechanic::get_personal_cvehicle();
|
||||||
|
if (personal_vehicle)
|
||||||
{
|
{
|
||||||
apply_godmode_to_vehicle(personal_vehicle, true);
|
apply_godmode_to_vehicle(personal_vehicle, true);
|
||||||
apply_godmode_to_vehicle(g_local_player->m_vehicle, personal_vehicle == g_local_player->m_vehicle);
|
|
||||||
}
|
}
|
||||||
|
apply_godmode_to_vehicle(g_local_player->m_vehicle, personal_vehicle == g_local_player->m_vehicle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user