refactor: initial inform
This commit is contained in:
parent
995bbac48c
commit
d6b3bf389c
|
@ -58,6 +58,8 @@ export default class Game {
|
|||
}
|
||||
});
|
||||
Promise.resolve(entity.hydrate()).then(() => {
|
||||
// Flush AABB for visibility.
|
||||
entity.tick(0);
|
||||
// Sync world time.
|
||||
entity.addSynchronized(this.worldTime);
|
||||
// Add entity to room.
|
||||
|
@ -65,6 +67,8 @@ export default class Game {
|
|||
this.room.addEntityToLayer(entity, 0);
|
||||
entity.addSynchronized(this.room);
|
||||
}
|
||||
entity.queuePacket(new SelfEntityPacket(entity.numericUid));
|
||||
entity.inform();
|
||||
});
|
||||
// Listen for events.
|
||||
socket.on('packet', this.createPacketListener(socket));
|
||||
|
|
Loading…
Reference in New Issue
Block a user