Enter vehicle only on server

This commit is contained in:
in0finite 2019-04-28 22:17:37 +02:00
parent 91ffd9531f
commit 30dc42d3ad

View file

@ -19,6 +19,9 @@ namespace SanAndreasUnity.Behaviours.Peds.States
public bool TryEnterVehicle(Vehicle vehicle, Vehicle.SeatAlignment seatAlignment, bool immediate = false)
{
// this code heavily modifies game state, so it can run only on server
Net.NetStatus.ThrowIfNotOnServer();
if (!this.CanEnterVehicle (vehicle, seatAlignment))
return false;