From d6b3bf389ccbdeb8e99d4f58d7fe6bbfeeee1c49 Mon Sep 17 00:00:00 2001 From: cha0s Date: Tue, 1 Oct 2019 22:43:20 -0500 Subject: [PATCH] refactor: initial inform --- server/game.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/game.js b/server/game.js index 06f4fab..b204a4d 100644 --- a/server/game.js +++ b/server/game.js @@ -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));