mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-12-22 03:50:04 +00:00
[WIP] Convert most of Chunking to Entity-based system
Player and all NPCs now have a common superclass, with virtual functions so smooth over shared behavior. EntityRef is a simple class that points to an arbitrary Entity. This commit is not yet functional.
This commit is contained in:
@@ -165,7 +165,7 @@ static void transportWarpHandler(CNSocket* sock, CNPacketData* data) {
|
||||
if (target == nullptr)
|
||||
return;
|
||||
// we warped; update position and chunks
|
||||
Chunking::updatePlayerChunk(sock, plr->chunkPos, std::make_tuple(0, 0, 0)); // force player to reload chunks
|
||||
Chunking::updateEntityChunk({sock}, plr->chunkPos, std::make_tuple(0, 0, 0)); // force player to reload chunks
|
||||
PlayerManager::updatePlayerPosition(sock, target->x, target->y, target->z, INSTANCE_OVERWORLD, plr->angle);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user