From 84b94f34c6ef00379783ec3c4eab7bd74ebfe1c2 Mon Sep 17 00:00:00 2001 From: in0finite Date: Thu, 25 Apr 2019 16:35:29 +0200 Subject: [PATCH] Only on server --- Assets/Scripts/Behaviours/Ped/Ped.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/Behaviours/Ped/Ped.cs b/Assets/Scripts/Behaviours/Ped/Ped.cs index c9eaccd9..0d64c465 100644 --- a/Assets/Scripts/Behaviours/Ped/Ped.cs +++ b/Assets/Scripts/Behaviours/Ped/Ped.cs @@ -300,7 +300,8 @@ namespace SanAndreasUnity.Behaviours this.CurrentState.UpdateState (); } - this.ResetIfFallingBelowTheWorld(); + if (NetStatus.IsServer) + this.ResetIfFallingBelowTheWorld(); // ConstrainPosition (); @@ -311,7 +312,7 @@ namespace SanAndreasUnity.Behaviours //if (IsDrivingVehicle) // UpdateWheelTurning(); - //If player falls from the map + //If player falls from the map - wait, didn't we just do this above ? if (IsGrounded && transform.position.y < -50) { Vector3 t = transform.position; @@ -390,7 +391,7 @@ namespace SanAndreasUnity.Behaviours void ResetIfFallingBelowTheWorld() { // TODO: this code needs fixing - + // Reset to a valid (and solid!) start position when falling below the world if (transform.position.y < -300) {