mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-23 04:23:04 +00:00
Working on ped networking 2
This commit is contained in:
parent
c60d1ae2d4
commit
a5b8e5c51c
3 changed files with 20 additions and 0 deletions
|
@ -387,6 +387,8 @@ namespace SanAndreasUnity.Behaviours
|
|||
|
||||
this.UpdateDamageStuff ();
|
||||
|
||||
this.Update_Net();
|
||||
|
||||
// IsWalking = IsRunning = false;
|
||||
|
||||
if (this.CurrentState != null)
|
||||
|
|
|
@ -22,6 +22,16 @@ namespace SanAndreasUnity.Behaviours
|
|||
|
||||
}
|
||||
|
||||
public override void OnStartClient()
|
||||
{
|
||||
base.OnStartClient();
|
||||
|
||||
if (this.isServer)
|
||||
return;
|
||||
|
||||
this.PlayerModel.Load(m_net_pedId);
|
||||
}
|
||||
|
||||
void Update_Net()
|
||||
{
|
||||
m_net_pedId = this.PedDef.Id;
|
||||
|
|
|
@ -137,6 +137,14 @@ namespace SanAndreasUnity.Behaviours
|
|||
// used to play weapon sound
|
||||
AudioSource m_audioSource;
|
||||
|
||||
/*
|
||||
#region SyncVars
|
||||
[SyncVar] int m_net_id = 0;
|
||||
[SyncVar] int m_net_ammoInClip = 0;
|
||||
[SyncVar] int m_net_ammoOutsideOfClip = 0;
|
||||
#endregion
|
||||
*/
|
||||
|
||||
|
||||
|
||||
static Weapon ()
|
||||
|
|
Loading…
Reference in a new issue