mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-23 04:23:04 +00:00
Only on server
This commit is contained in:
parent
94f39f41d1
commit
84b94f34c6
1 changed files with 4 additions and 3 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue