fix: conditional visible entity removal
This commit is contained in:
parent
22e8d7f45f
commit
6c78ba9cb4
|
@ -137,6 +137,9 @@ export default (latus) => class EntityList extends decorate(JsonResource) {
|
|||
if (-1 === index) {
|
||||
packets.push(entity.createPacket(informed));
|
||||
}
|
||||
else {
|
||||
previousVisibleEntities.splice(index, 1);
|
||||
}
|
||||
const entityPackets = entity.packets(informed);
|
||||
if (entityPackets.length > 0) {
|
||||
updates.push({
|
||||
|
@ -144,7 +147,6 @@ export default (latus) => class EntityList extends decorate(JsonResource) {
|
|||
packets: entityPackets,
|
||||
});
|
||||
}
|
||||
previousVisibleEntities.splice(index, 1);
|
||||
}
|
||||
// Send updates.
|
||||
this.#informedEntities.set(informed, visibleEntities);
|
||||
|
|
Loading…
Reference in New Issue
Block a user