mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-10 21:41:50 +00:00
F5 key fix
This commit is contained in:
parent
f9bb193e38
commit
a6a1e7866a
1 changed files with 2 additions and 7 deletions
|
|
@ -116,12 +116,7 @@ void LevelScreen::updateHotkeys() {
|
||||||
level->player->debug = !level->player->debug;
|
level->player->debug = !level->player->debug;
|
||||||
}
|
}
|
||||||
if (Events::jpressed(keycode::F5)) {
|
if (Events::jpressed(keycode::F5)) {
|
||||||
for (uint i = 0; i < level->chunks->volume; i++) {
|
level->chunks->clear();
|
||||||
shared_ptr<Chunk> chunk = level->chunks->chunks[i];
|
|
||||||
if (chunk != nullptr && chunk->isReady()) {
|
|
||||||
chunk->setModified(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -132,7 +127,7 @@ void LevelScreen::update(float delta) {
|
||||||
bool inputLocked = hud->isPause() ||
|
bool inputLocked = hud->isPause() ||
|
||||||
hud->isInventoryOpen() ||
|
hud->isInventoryOpen() ||
|
||||||
gui->isFocusCaught();
|
gui->isFocusCaught();
|
||||||
if (!inputLocked) {
|
if (!gui->isFocusCaught()) {
|
||||||
updateHotkeys();
|
updateHotkeys();
|
||||||
}
|
}
|
||||||
level->updatePlayer(delta, !inputLocked, hud->isPause(), !inputLocked);
|
level->updatePlayer(delta, !inputLocked, hud->isPause(), !inputLocked);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue