don't use gravity and don't detect collisions on client

This commit is contained in:
in0finite 2021-02-04 22:19:34 +01:00
parent 9caf2df790
commit 91bc7547a5

View file

@ -34,6 +34,13 @@ namespace SanAndreasUnity.Behaviours.Vehicles
_rigidBody = gameObject.GetComponent<Rigidbody>();
_rigidBody.interpolation = Net.NetStatus.IsServer ? VehicleManager.Instance.rigidbodyInterpolationOnServer : VehicleManager.Instance.rigidbodyInterpolationOnClient;
if (Net.NetStatus.IsClientOnly)
{
_rigidBody.useGravity = false;
_rigidBody.detectCollisions = false;
}
HandlingData = Handling.Get<Handling.Car>(Definition.HandlingName);
VConsts.Changed += UpdateValues;