improve hunger mechanics

This commit is contained in:
p2r3
2025-08-27 17:03:55 +03:00
parent 68eb77c424
commit f5119d0b70
4 changed files with 20 additions and 18 deletions

View File

@@ -243,7 +243,7 @@ void handlePacket (int client_fd, int length, int packet_id, int state) {
if (player->saturation == 0) {
if (player->hunger > 0) player->hunger--;
player->saturation = 200;
sc_setHealth(client_fd, player->health, player->hunger);
sc_setHealth(client_fd, player->health, player->hunger, player->saturation);
} else if (player->flags & 0x08) {
player->saturation -= 1;
}