mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2024-12-28 18:25:18 +00:00
- rename
- apparently weaver weave arrays correctly, so be explicit
This commit is contained in:
parent
141ed5c13c
commit
daba499d90
@ -5,14 +5,14 @@ using System.Linq;
|
||||
|
||||
namespace QSB.ConversationSync.Messages
|
||||
{
|
||||
internal class RemoteDialogueResyncMessage : QSBWorldObjectMessage<QSBRemoteDialogueTrigger>
|
||||
internal class RemoteDialogueInitialStateMessage : QSBWorldObjectMessage<QSBRemoteDialogueTrigger>
|
||||
{
|
||||
private bool _inRemoteDialogue;
|
||||
private bool[] _activatedDialogues;
|
||||
private int _dialogueIndex;
|
||||
private bool _colliderEnabled;
|
||||
|
||||
public RemoteDialogueResyncMessage(RemoteDialogueTrigger trigger)
|
||||
public RemoteDialogueInitialStateMessage(RemoteDialogueTrigger trigger)
|
||||
{
|
||||
_inRemoteDialogue = trigger._inRemoteDialogue;
|
||||
_activatedDialogues = trigger._activatedDialogues;
|
||||
@ -25,7 +25,7 @@ namespace QSB.ConversationSync.Messages
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(_inRemoteDialogue);
|
||||
writer.Write(_activatedDialogues);
|
||||
writer.WriteArray(_activatedDialogues);
|
||||
writer.Write(_dialogueIndex);
|
||||
writer.Write(_colliderEnabled);
|
||||
}
|
||||
@ -34,7 +34,7 @@ namespace QSB.ConversationSync.Messages
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
_inRemoteDialogue = reader.Read<bool>();
|
||||
_activatedDialogues = reader.Read<bool[]>();
|
||||
_activatedDialogues = reader.ReadArray<bool>();
|
||||
_dialogueIndex = reader.Read<int>();
|
||||
_colliderEnabled = reader.Read<bool>();
|
||||
}
|
@ -10,7 +10,7 @@ namespace QSB.ConversationSync.WorldObjects
|
||||
{
|
||||
if (QSBCore.IsHost)
|
||||
{
|
||||
this.SendMessage(new RemoteDialogueResyncMessage(AttachedObject));
|
||||
this.SendMessage(new RemoteDialogueInitialStateMessage(AttachedObject));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@ namespace QSB.MeteorSync.Messages
|
||||
{
|
||||
/// called when we request a resync on client join
|
||||
/// pain
|
||||
public class FragmentResyncMessage : QSBWorldObjectMessage<QSBFragment>
|
||||
public class FragmentInitialStateMessage : QSBWorldObjectMessage<QSBFragment>
|
||||
{
|
||||
private float Integrity;
|
||||
private float OrigIntegrity;
|
||||
@ -23,7 +23,7 @@ namespace QSB.MeteorSync.Messages
|
||||
private Vector3 RelVel;
|
||||
private Vector3 RelAngVel;
|
||||
|
||||
public FragmentResyncMessage(QSBFragment qsbFragment)
|
||||
public FragmentInitialStateMessage(QSBFragment qsbFragment)
|
||||
{
|
||||
Integrity = qsbFragment.AttachedObject._integrity;
|
||||
OrigIntegrity = qsbFragment.AttachedObject._origIntegrity;
|
@ -26,7 +26,7 @@ namespace QSB.MeteorSync.WorldObjects
|
||||
{
|
||||
if (QSBCore.IsHost)
|
||||
{
|
||||
this.SendMessage(new FragmentResyncMessage(this) { To = to });
|
||||
this.SendMessage(new FragmentInitialStateMessage(this) { To = to });
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -10,11 +10,11 @@ namespace QSB.TriggerSync.Messages
|
||||
/// <summary>
|
||||
/// always sent by host
|
||||
/// </summary>
|
||||
public class TriggerResyncMessage : QSBWorldObjectMessage<IQSBTrigger>
|
||||
public class TriggerInitialStateMessage : QSBWorldObjectMessage<IQSBTrigger>
|
||||
{
|
||||
private uint[] _playerIds;
|
||||
|
||||
public TriggerResyncMessage(IEnumerable<PlayerInfo> occupants) =>
|
||||
public TriggerInitialStateMessage(IEnumerable<PlayerInfo> occupants) =>
|
||||
_playerIds = occupants.Select(x => x.PlayerId).ToArray();
|
||||
|
||||
public override void Serialize(NetworkWriter writer)
|
@ -53,7 +53,7 @@ namespace QSB.TriggerSync.WorldObjects
|
||||
{
|
||||
if (QSBCore.IsHost)
|
||||
{
|
||||
((IQSBTrigger)this).SendMessage(new TriggerResyncMessage(Occupants) { To = to });
|
||||
((IQSBTrigger)this).SendMessage(new TriggerInitialStateMessage(Occupants) { To = to });
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user