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,42 @@
using NitroxClient.Communication.Packets.Processors.Abstract;
using NitroxClient.GameLogic;
using NitroxClient.GameLogic.PlayerLogic;
using NitroxModel.Packets;
namespace NitroxClient.Communication.Packets.Processors;
public class SetIntroCinematicModeProcessor : ClientPacketProcessor<SetIntroCinematicMode>
{
private readonly PlayerManager playerManager;
private readonly PlayerCinematics playerCinematics;
private readonly LocalPlayer localPlayer;
public SetIntroCinematicModeProcessor(PlayerManager playerManager, PlayerCinematics playerCinematics, LocalPlayer localPlayer)
{
this.playerManager = playerManager;
this.playerCinematics = playerCinematics;
this.localPlayer = localPlayer;
}
public override void Process(SetIntroCinematicMode packet)
{
if (localPlayer.PlayerId == packet.PlayerId)
{
if (packet.PartnerId.HasValue)
{
playerCinematics.IntroCinematicPartnerId = packet.PartnerId;
}
localPlayer.IntroCinematicMode = packet.Mode;
return;
}
if (playerManager.TryFind(packet.PlayerId, out RemotePlayer remotePlayer))
{
remotePlayer.PlayerContext.IntroCinematicMode = packet.Mode;
return;
}
Log.Debug($"SetIntroCinematicMode couldn't find Player with id {packet.PlayerId}. This is normal if player has not yet officially joined.");
}
}