another impossible() update for dog_eat()

This commit is contained in:
nhmall
2026-04-11 07:17:20 -04:00
parent 85f03deca9
commit f29cea4a35

View File

@@ -313,12 +313,15 @@ dog_eat(struct monst *mtmp,
/* It's a reward if it's DOGFOOD and the player dropped/threw it.
We know the player had it if invlet is set. -dlc */
if (dogfood(mtmp, obj) == DOGFOOD && obj->invlet) {
int prior_apport = edog->apport;
edog->apport += (int) (200L / ((long) edog->dropdist + svm.moves
- edog->droptime));
if (edog->apport <= 0) {
impossible("dog_eat: pet apport <= 0 (%d, %d, %ld, %ld, %ud, %ud)",
impossible("dog_eat: pet apport <= 0 (%d, %d, %ld, %ld, %d, %ud, %ud)",
edog->apport, edog->dropdist, edog->droptime,
svm.moves,
prior_apport,
/* check whether edog struct got clobbered;
these two values should always match if
edog content is still intact */