fix: hydrate entities

This commit is contained in:
cha0s 2019-10-09 03:45:54 -05:00
parent 04f3b07250
commit 54eb6f20d4

View File

@ -44,8 +44,10 @@ export class EntityList extends decorate(class {}) {
} }
if (packet instanceof SynchronizedCreatePacket) { if (packet instanceof SynchronizedCreatePacket) {
Entity.loadOrInstance(packet.data.spec).then((entity) => { Entity.loadOrInstance(packet.data.spec).then((entity) => {
entity.hydrate().then(() => {
this.addEntity(entity); this.addEntity(entity);
}); });
});
} }
if (packet instanceof SynchronizedDestroyPacket) { if (packet instanceof SynchronizedDestroyPacket) {
const uuid = packet.data.synchronized.id; const uuid = packet.data.synchronized.id;