refactor: send updates even if it's a create
This commit is contained in:
parent
bd999518e7
commit
d98435b49a
|
@ -137,17 +137,14 @@ export default (latus) => class EntityList extends decorate(JsonResource) {
|
|||
if (-1 === index) {
|
||||
packets.push(entity.createPacket(informed));
|
||||
}
|
||||
// Still visible entity.
|
||||
else {
|
||||
const entityPackets = entity.packets(informed);
|
||||
if (entityPackets.length > 0) {
|
||||
updates.push({
|
||||
uuid: entity.instanceUuid,
|
||||
packets: entityPackets,
|
||||
});
|
||||
}
|
||||
previousVisibleEntities.splice(index, 1);
|
||||
const entityPackets = entity.packets(informed);
|
||||
if (entityPackets.length > 0) {
|
||||
updates.push({
|
||||
uuid: entity.instanceUuid,
|
||||
packets: entityPackets,
|
||||
});
|
||||
}
|
||||
previousVisibleEntities.splice(index, 1);
|
||||
}
|
||||
// Send updates.
|
||||
this.#informedEntities.set(informed, visibleEntities);
|
||||
|
|
Loading…
Reference in New Issue
Block a user