mirror of
https://github.com/Caraxi/mare.client.git
synced 2026-01-01 16:33:39 +01:00
save but not send hat/visor/weapon state, fix sync of mounts, speed up cache generation a bit
This commit is contained in:
parent
b8275ca070
commit
307c90f40e
7 changed files with 86 additions and 30 deletions
|
|
@ -32,8 +32,11 @@ namespace MareSynchronos.Models
|
|||
|
||||
public byte[] EquipSlotData { get; set; } = new byte[40];
|
||||
public byte[] CustomizeData { get; set; } = new byte[26];
|
||||
public byte? HatState { get; set; }
|
||||
public byte? VisorWeaponState { get; set; }
|
||||
|
||||
public bool HasUnprocessedUpdate { get; set; } = false;
|
||||
public bool DoNotSendUpdate { get; set; } = false;
|
||||
public bool IsProcessing { get; set; } = false;
|
||||
|
||||
public unsafe void CheckAndUpdateObject()
|
||||
|
|
@ -94,6 +97,25 @@ namespace MareSynchronos.Models
|
|||
}
|
||||
}
|
||||
|
||||
if (ObjectKind is not ObjectKind.Mount)
|
||||
{
|
||||
var newHatState = Marshal.ReadByte((IntPtr)customizeData + 30, 0);
|
||||
var newWeaponOrVisorState = Marshal.ReadByte((IntPtr)customizeData + 31, 0);
|
||||
if (newHatState != HatState)
|
||||
{
|
||||
if (HatState != null) DoNotSendUpdate = true;
|
||||
HatState = newHatState;
|
||||
hasChanges = true;
|
||||
}
|
||||
|
||||
if (newWeaponOrVisorState != VisorWeaponState)
|
||||
{
|
||||
if (VisorWeaponState != null) DoNotSendUpdate = true;
|
||||
VisorWeaponState = newWeaponOrVisorState;
|
||||
hasChanges = true;
|
||||
}
|
||||
}
|
||||
|
||||
return hasChanges;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue