first commit
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
using NitroxModel.Packets;
|
||||
using NitroxServer.Communication.Packets.Processors.Abstract;
|
||||
using NitroxServer.GameLogic.Entities;
|
||||
|
||||
namespace NitroxServer.Communication.Packets.Processors;
|
||||
|
||||
public class PlayerSeeOutOfCellEntityProcessor : AuthenticatedPacketProcessor<PlayerSeeOutOfCellEntity>
|
||||
{
|
||||
private readonly EntityRegistry entityRegistry;
|
||||
|
||||
public PlayerSeeOutOfCellEntityProcessor(EntityRegistry entityRegistry)
|
||||
{
|
||||
this.entityRegistry = entityRegistry;
|
||||
}
|
||||
|
||||
public override void Process(PlayerSeeOutOfCellEntity packet, Player player)
|
||||
{
|
||||
if (entityRegistry.GetEntityById(packet.EntityId).HasValue)
|
||||
{
|
||||
player.OutOfCellVisibleEntities.Add(packet.EntityId);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user