mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +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;
|
||||
}
|
||||
if (Events::jpressed(keycode::F5)) {
|
||||
for (uint i = 0; i < level->chunks->volume; i++) {
|
||||
shared_ptr<Chunk> chunk = level->chunks->chunks[i];
|
||||
if (chunk != nullptr && chunk->isReady()) {
|
||||
chunk->setModified(true);
|
||||
}
|
||||
}
|
||||
level->chunks->clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -132,7 +127,7 @@ void LevelScreen::update(float delta) {
|
|||
bool inputLocked = hud->isPause() ||
|
||||
hud->isInventoryOpen() ||
|
||||
gui->isFocusCaught();
|
||||
if (!inputLocked) {
|
||||
if (!gui->isFocusCaught()) {
|
||||
updateHotkeys();
|
||||
}
|
||||
level->updatePlayer(delta, !inputLocked, hud->isPause(), !inputLocked);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue