mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-17 01:13:05 +00:00
Update PlayerInformationMessage.cs
This commit is contained in:
parent
9169283ac4
commit
ae6131c64a
@ -18,6 +18,7 @@ public class PlayerInformationMessage : QSBMessage
|
||||
private bool ProbeActive;
|
||||
private ClientState ClientState;
|
||||
private float FieldOfView;
|
||||
private bool IsInShip;
|
||||
|
||||
public PlayerInformationMessage()
|
||||
{
|
||||
@ -32,6 +33,7 @@ public class PlayerInformationMessage : QSBMessage
|
||||
ProbeActive = player.ProbeActive;
|
||||
ClientState = player.State;
|
||||
FieldOfView = PlayerData.GetGraphicSettings().fieldOfView;
|
||||
IsInShip = player.IsInShip;
|
||||
}
|
||||
|
||||
public override void Serialize(NetworkWriter writer)
|
||||
@ -47,6 +49,7 @@ public class PlayerInformationMessage : QSBMessage
|
||||
writer.Write(ProbeActive);
|
||||
writer.Write(ClientState);
|
||||
writer.Write(FieldOfView);
|
||||
writer.Write(IsInShip);
|
||||
}
|
||||
|
||||
public override void Deserialize(NetworkReader reader)
|
||||
@ -62,6 +65,7 @@ public class PlayerInformationMessage : QSBMessage
|
||||
ProbeActive = reader.Read<bool>();
|
||||
ClientState = reader.Read<ClientState>();
|
||||
FieldOfView = reader.ReadFloat();
|
||||
IsInShip = reader.ReadBool();
|
||||
}
|
||||
|
||||
public override void OnReceiveRemote()
|
||||
@ -78,6 +82,7 @@ public class PlayerInformationMessage : QSBMessage
|
||||
player.SignalscopeEquipped = SignalscopeEquipped;
|
||||
player.TranslatorEquipped = TranslatorEquipped;
|
||||
player.ProbeActive = ProbeActive;
|
||||
player.IsInShip = IsInShip;
|
||||
if (QSBPlayerManager.LocalPlayer.IsReady && player.IsReady)
|
||||
{
|
||||
player.UpdateObjectsFromStates();
|
||||
|
Loading…
Reference in New Issue
Block a user