From 59d98a48a34556e536fbd641d0814efacb60d8b3 Mon Sep 17 00:00:00 2001 From: in0finite Date: Thu, 25 Apr 2019 00:19:22 +0200 Subject: [PATCH] Add weapons on start --- Assets/Scripts/Behaviours/WeaponHolder.cs | 12 ++++-------- Docs/Multiplayer.md | 4 ---- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/Assets/Scripts/Behaviours/WeaponHolder.cs b/Assets/Scripts/Behaviours/WeaponHolder.cs index 68c8d2f3..63eadd4e 100644 --- a/Assets/Scripts/Behaviours/WeaponHolder.cs +++ b/Assets/Scripts/Behaviours/WeaponHolder.cs @@ -110,17 +110,13 @@ namespace SanAndreasUnity.Behaviours { void Start () { PlayerModel.onLateUpdate += this.UpdateWeaponTransform; - } - void OnLoaderFinished () - { - if (this.autoAddWeapon) + if (m_ped.isServer) { - this.AddRandomWeapons (); - - if (!this.IsHoldingWeapon) + if (this.autoAddWeapon) { - this.SwitchWeapon (WeaponSlot.Pistol); + this.AddRandomWeapons(); + this.SwitchWeapon(WeaponSlot.Pistol); } } } diff --git a/Docs/Multiplayer.md b/Docs/Multiplayer.md index 5b03f847..22ab4456 100644 --- a/Docs/Multiplayer.md +++ b/Docs/Multiplayer.md @@ -12,10 +12,6 @@ - add OK button to message boxes -- player's ped must be created by server (when host starts) - it should be removed from scenes - -- PedsWindow throws NRE when Ped.Instance is null - - don't show StartGame/JoinGame window in pause menu - spawn ped right after player connects