first commit

This commit is contained in:
2025-07-06 00:23:46 +02:00
commit 38f50c8819
1788 changed files with 112878 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
using NitroxClient.Communication.Packets.Processors.Abstract;
using NitroxClient.GameLogic;
using NitroxClient.MonoBehaviours;
using NitroxModel.DataStructures.Util;
using NitroxModel.Packets;
using UnityEngine;
namespace NitroxClient.Communication.Packets.Processors
{
public class EscapePodChangedProcessor : ClientPacketProcessor<EscapePodChanged>
{
private readonly PlayerManager remotePlayerManager;
public EscapePodChangedProcessor(PlayerManager remotePlayerManager)
{
this.remotePlayerManager = remotePlayerManager;
}
public override void Process(EscapePodChanged packet)
{
Optional<RemotePlayer> remotePlayer = remotePlayerManager.Find(packet.PlayerId);
if (remotePlayer.HasValue)
{
EscapePod escapePod = null;
if (packet.EscapePodId.HasValue)
{
GameObject sub = NitroxEntity.RequireObjectFrom(packet.EscapePodId.Value);
escapePod = sub.GetComponent<EscapePod>();
}
remotePlayer.Value.SetEscapePod(escapePod);
}
}
}
}