another impossible() update for dog_eat()
This commit is contained in:
+4
-1
@@ -313,12 +313,15 @@ dog_eat(struct monst *mtmp,
|
|||||||
/* It's a reward if it's DOGFOOD and the player dropped/threw it.
|
/* 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 */
|
We know the player had it if invlet is set. -dlc */
|
||||||
if (dogfood(mtmp, obj) == DOGFOOD && obj->invlet) {
|
if (dogfood(mtmp, obj) == DOGFOOD && obj->invlet) {
|
||||||
|
int prior_apport = edog->apport;
|
||||||
|
|
||||||
edog->apport += (int) (200L / ((long) edog->dropdist + svm.moves
|
edog->apport += (int) (200L / ((long) edog->dropdist + svm.moves
|
||||||
- edog->droptime));
|
- edog->droptime));
|
||||||
if (edog->apport <= 0) {
|
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,
|
edog->apport, edog->dropdist, edog->droptime,
|
||||||
svm.moves,
|
svm.moves,
|
||||||
|
prior_apport,
|
||||||
/* check whether edog struct got clobbered;
|
/* check whether edog struct got clobbered;
|
||||||
these two values should always match if
|
these two values should always match if
|
||||||
edog content is still intact */
|
edog content is still intact */
|
||||||
|
|||||||
Reference in New Issue
Block a user