1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00:00

Disable autoforward if player is dead

This commit is contained in:
ANAND 2019-05-04 12:43:31 +05:30 committed by SmallJoker
parent ded5da7800
commit 3c395d908f
4 changed files with 12 additions and 7 deletions

View file

@ -2466,7 +2466,7 @@ void Game::updatePlayerControl(const CameraOrientation &cam)
}
// autoforward if set: simulate "up" key
if (player->getPlayerSettings().continuous_forward) {
if (player->getPlayerSettings().continuous_forward && !player->isDead()) {
control.up = true;
keypress_bits |= 1U << 0;
}
@ -2483,7 +2483,7 @@ inline void Game::step(f32 *dtime)
bool can_be_and_is_paused =
(simple_singleplayer_mode && g_menumgr.pausesGame());
if (can_be_and_is_paused) { // This is for a singleplayer server
if (can_be_and_is_paused) { // This is for a singleplayer server
*dtime = 0; // No time passes
} else {
if (server)