fix: player ticks if game paused
before: player will tick if the game is paused allowing him to take damage from poison or lava. now: player will not tick anymore if game is paused, so will not take damage anymore
This commit is contained in:
@@ -183,7 +183,7 @@ void PlayerConnection::tick()
|
||||
// Ensure server-side player tick runs even when no move packet was received this tick.
|
||||
// Without this, environmental damage (drowning, fire, lava) is never applied to clients
|
||||
// that don't send frequent move packets.
|
||||
if (!didTick && player != nullptr)
|
||||
if (!didTick && player != nullptr && !server->IsServerPaused() && !app.IsAppPaused())
|
||||
{
|
||||
player->doTick(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user