Account for pet hunger while away from a level

This commit is contained in:
Crissman Loomis
2026-09-14 15:57:14 +09:00
parent aec687db2c
commit c63ee6ac7e
2 changed files with 5 additions and 0 deletions
+2
View File
@@ -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
+3
View File
@@ -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