Inform clients of entity destruction for all entity types
This commit is contained in:
parent
278c90f5f9
commit
1a08b5e991
1 changed files with 1 additions and 2 deletions
|
@ -73,7 +73,6 @@ export class World {
|
||||||
entity.justUnloaded = new Array<number>();
|
entity.justUnloaded = new Array<number>();
|
||||||
|
|
||||||
this.players.remove(entity.entityId);
|
this.players.remove(entity.entityId);
|
||||||
this.sendToNearbyClients(entity, new PacketDestroyEntity(entity.entityId).writeData());
|
|
||||||
|
|
||||||
const writer = createWriter(Endian.BE);
|
const writer = createWriter(Endian.BE);
|
||||||
entity.toSave(writer);
|
entity.toSave(writer);
|
||||||
|
@ -82,7 +81,7 @@ export class World {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.entites.remove(entity.entityId);
|
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) {
|
public chunkExists(coordPairOrX:number, chunkZ?:number) {
|
||||||
|
|
Loading…
Reference in a new issue