From 1a08b5e991b56ed511becd2d10d6cb91db7dca38 Mon Sep 17 00:00:00 2001 From: Holly Date: Sun, 12 Nov 2023 23:59:54 +0000 Subject: [PATCH] Inform clients of entity destruction for all entity types --- server/World.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/World.ts b/server/World.ts index baa0f45..3ef13f2 100644 --- a/server/World.ts +++ b/server/World.ts @@ -73,7 +73,6 @@ export class World { entity.justUnloaded = new Array(); this.players.remove(entity.entityId); - this.sendToNearbyClients(entity, new PacketDestroyEntity(entity.entityId).writeData()); const writer = createWriter(Endian.BE); entity.toSave(writer); @@ -82,7 +81,7 @@ export class World { } this.entites.remove(entity.entityId); - // TODO: Inform clients about entity removal + this.sendToNearbyClients(entity, new PacketDestroyEntity(entity.entityId).writeData()); } public chunkExists(coordPairOrX:number, chunkZ?:number) {