From 335fdb417ca36bc81863f19bfe3b3432c2d830b7 Mon Sep 17 00:00:00 2001 From: CPunch Date: Tue, 5 Dec 2023 19:17:58 -0600 Subject: [PATCH] fix: add player to current chunk on LOAD_COMPLETE --- shard/join.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shard/join.go b/shard/join.go index 16a184f..1a9a1a8 100644 --- a/shard/join.go +++ b/shard/join.go @@ -85,7 +85,9 @@ func (server *ShardServer) LoadingComplete(peer *cnet.Peer, pkt protocol.Packet) // we send the chunk updates (PC_NEW, NPC_NEW, etc.) after the enter packet chunkPos := entity.MakeChunkPosition(plr.X, plr.Y) viewableChunks := server.getViewableChunks(chunkPos) + plr.SetChunkPos(chunkPos) + server.getChunk(chunkPos).AddEntity(plr) server.addEntityToChunks(plr, viewableChunks) return nil }