mirror of
https://github.com/CPunch/gopenfusion.git
synced 2024-11-14 03:50:05 +00:00
fix: add player to current chunk on LOAD_COMPLETE
This commit is contained in:
parent
2a6fb25f03
commit
335fdb417c
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user