From c63ee6ac7ef78639db31660c52aaa2e60cb6afd0 Mon Sep 17 00:00:00 2001 From: Crissman Loomis Date: Mon, 14 Sep 2026 15:57:14 +0900 Subject: [PATCH] Account for pet hunger while away from a level --- doc/fixes5-0-1.txt | 2 ++ src/restore.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/doc/fixes5-0-1.txt b/doc/fixes5-0-1.txt index 7dd6d9c30..e20471335 100644 --- a/doc/fixes5-0-1.txt +++ b/doc/fixes5-0-1.txt @@ -90,6 +90,8 @@ after polymorph or revival from corpse, monsters were not interacting with fix undead corpses (zombies, etc.) now being edible alias rings of constitution, strength, and damage, spellbook/scroll of identification +pets left on another level no longer have their hunger postponed by the + time spent away Platform- and/or Interface-Specific Fixes diff --git a/src/restore.c b/src/restore.c index cd6e86d0c..d5e7cca19 100644 --- a/src/restore.c +++ b/src/restore.c @@ -1246,6 +1246,9 @@ getlev(NHFILE *nhfp, int pid, xint8 lev) : peace_minded(mtmp->data); set_malign(mtmp); } else if (elapsed > 0L) { + /* restmon() based hunger on now; account for time away */ + if (has_edog(mtmp)) + EDOG(mtmp)->hungrytime -= elapsed; mon_catchup_elapsed_time(mtmp, elapsed); } /* update shape-changers in case protection against