Extra give control checks (#2847)

Closes #2841
Closes #2088
This commit is contained in:
gir489 2024-03-19 14:06:03 -04:00 committed by GitHub
parent 0bf069ad99
commit caa813c4a8

View File

@ -533,9 +533,12 @@ namespace big
|| personal_vehicle == veh //Or we're in our personal vehicle.
|| self::spawned_vehicles.contains(net_id)) // Or it's a vehicle we spawned.
{
g_pointers->m_gta.m_send_event_ack(event_manager, source_player, target_player, event_index, event_handled_bitset); // Tell them to get bent.
g.reactions.request_control_event.process(plyr);
return;
if (g_local_player->m_vehicle->m_driver != source_player->m_player_info->m_ped) //This will block hackers who are not in the car but still want control.
{
g_pointers->m_gta.m_send_event_ack(event_manager, source_player, target_player, event_index, event_handled_bitset); // Tell them to get bent.
g.reactions.request_control_event.process(plyr);
return;
}
}
}
buffer->Seek(0);