mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-27 12:35:28 +00:00
f239acd724
* * removed need for NetPlayer * split JoinPlayer into JoinPlayer and LeavePlayer * cleanup of player and ship in LeavePlayer * null checks in anim mirror * it kinda works * resetting some more stuff when DCing * cleaning up ship * removed some unused code * cleanup * cleaning up all client owned objects * resetting (mostly) anim stuff when leaving * setting local instance on player transform sync right away Co-authored-by: Ricardo Lopes <Raicuparta@users.noreply.github.com>
27 lines
716 B
C#
27 lines
716 B
C#
using System;
|
|
using System.Linq;
|
|
using QSB.Messaging;
|
|
using UnityEngine.Networking;
|
|
|
|
namespace QSB.Events
|
|
{
|
|
public class LeaveMessage : NameMessage
|
|
{
|
|
public override MessageType MessageType => MessageType.Leave;
|
|
|
|
public uint[] ObjectIds { get; set; }
|
|
|
|
public override void Deserialize(NetworkReader reader)
|
|
{
|
|
base.Deserialize(reader);
|
|
ObjectIds = reader.ReadString().Split(',').Select(x => Convert.ToUInt32(x)).ToArray();
|
|
}
|
|
|
|
public override void Serialize(NetworkWriter writer)
|
|
{
|
|
base.Serialize(writer);
|
|
writer.Write(string.Join(",", ObjectIds.Select(x => x.ToString()).ToArray()));
|
|
}
|
|
}
|
|
}
|