mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
introduce local player
This commit is contained in:
parent
b5999fe364
commit
65fec4f4a9
16 changed files with 84 additions and 31 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue