F5 key fix
This commit is contained in:
parent
f9bb193e38
commit
a6a1e7866a
@ -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…
x
Reference in New Issue
Block a user