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 de5ff92fa0
commit ae27173b12
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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);