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:
parent
ded5da7800
commit
3c395d908f
4 changed files with 12 additions and 7 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue