introduce local player
This commit is contained in:
@@ -50,6 +50,10 @@ LevelController::LevelController(
|
||||
do {
|
||||
confirmed = 0;
|
||||
for (const auto& [_, player] : *level->players) {
|
||||
if (!player->isLoadingChunks()) {
|
||||
confirmed++;
|
||||
continue;
|
||||
}
|
||||
glm::vec3 position = player->getPosition();
|
||||
player->chunks->configure(
|
||||
std::floor(position.x), std::floor(position.z), 1
|
||||
@@ -69,6 +73,7 @@ void LevelController::update(float delta, bool pause) {
|
||||
if (player->isSuspended()) {
|
||||
continue;
|
||||
}
|
||||
player->updateEntity();
|
||||
glm::vec3 position = player->getPosition();
|
||||
player->chunks->configure(
|
||||
position.x,
|
||||
|
||||
Reference in New Issue
Block a user