Add weapons on start

This commit is contained in:
in0finite 2019-04-25 00:19:22 +02:00
parent 519ddd004e
commit 59d98a48a3
2 changed files with 4 additions and 12 deletions

View file

@ -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);
}
}
}

View file

@ -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