mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-23 12:33:02 +00:00
Enter vehicle only on server
This commit is contained in:
parent
91ffd9531f
commit
30dc42d3ad
1 changed files with 3 additions and 0 deletions
|
@ -19,6 +19,9 @@ namespace SanAndreasUnity.Behaviours.Peds.States
|
||||||
|
|
||||||
public bool TryEnterVehicle(Vehicle vehicle, Vehicle.SeatAlignment seatAlignment, bool immediate = false)
|
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))
|
if (!this.CanEnterVehicle (vehicle, seatAlignment))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue