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:
Lord_Cambion
2026-05-25 02:04:06 +02:00
parent 9c55f80368
commit ed63aaf8c4
5 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -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);
}