Move CurrentWeaponHash to full sync
This commit is contained in:
@ -38,7 +38,6 @@ namespace RageCoop.Core
|
||||
|
||||
public Vector3 AimCoords { get; set; }
|
||||
|
||||
public uint CurrentWeaponHash { get; set; }
|
||||
|
||||
public float Heading { get; set; }
|
||||
|
||||
@ -46,6 +45,8 @@ namespace RageCoop.Core
|
||||
|
||||
public int ModelHash { get; set; }
|
||||
|
||||
public uint CurrentWeaponHash { get; set; }
|
||||
|
||||
public byte[] Clothes { get; set; }
|
||||
|
||||
public Dictionary<uint, bool> WeaponComponents { get; set; }
|
||||
@ -99,8 +100,6 @@ namespace RageCoop.Core
|
||||
// Write ped speed
|
||||
byteArray.Add(Speed);
|
||||
|
||||
// Write ped weapon hash
|
||||
byteArray.AddRange(BitConverter.GetBytes(CurrentWeaponHash));
|
||||
|
||||
if (Flags.HasPedFlag(PedDataFlags.IsAiming))
|
||||
{
|
||||
@ -115,6 +114,9 @@ namespace RageCoop.Core
|
||||
// Write model hash
|
||||
byteArray.AddInt(ModelHash);
|
||||
|
||||
// Write ped weapon hash
|
||||
byteArray.AddUint(CurrentWeaponHash);
|
||||
|
||||
byteArray.AddRange(Clothes);
|
||||
|
||||
// Write player weapon components
|
||||
@ -185,8 +187,6 @@ namespace RageCoop.Core
|
||||
// Read player speed
|
||||
Speed = reader.ReadByte();
|
||||
|
||||
// Read player weapon hash
|
||||
CurrentWeaponHash = reader.ReadUInt32();
|
||||
|
||||
// Try to read aim coords
|
||||
if (Flags.HasPedFlag(PedDataFlags.IsAiming))
|
||||
@ -202,6 +202,9 @@ namespace RageCoop.Core
|
||||
// Read player model hash
|
||||
ModelHash = reader.ReadInt32();
|
||||
|
||||
// Read player weapon hash
|
||||
CurrentWeaponHash = reader.ReadUInt32();
|
||||
|
||||
// Read player clothes
|
||||
Clothes =reader.ReadBytes(36);
|
||||
|
||||
|
Reference in New Issue
Block a user