diff --git a/Assets/Scripts/Behaviours/Vehicles/VehicleController.cs b/Assets/Scripts/Behaviours/Vehicles/VehicleController.cs index 8bbc0162..3a7c82bc 100644 --- a/Assets/Scripts/Behaviours/Vehicles/VehicleController.cs +++ b/Assets/Scripts/Behaviours/Vehicles/VehicleController.cs @@ -1,19 +1,34 @@ using UnityEngine; using SanAndreasUnity.Net; +using Mirror; namespace SanAndreasUnity.Behaviours.Vehicles { - [RequireComponent(typeof(Vehicle))] - public class VehicleController : MonoBehaviour + + public class VehicleController : NetworkBehaviour { private Vehicle m_vehicle; + + [SyncVar] int m_net_id = 0; + private void Awake() { m_vehicle = GetComponent(); } + public override void OnStartClient() + { + base.OnStartClient(); + + if (!NetStatus.IsServer) + { + // load vehicle on clients + + } + } + private void Update() {