diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index 2e83436a0..6f845b803 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -1210,6 +1210,9 @@ add a level arrival region to the Gnone King's Wine Cellar variation of the Mines' End level so that hero can't end up in the treature chamber make potion of water become discovered if dipping a carried container into an uncursed one reports that water gets inside or slides right off +a monster which was temporarily asleep wouldn't be affected by taming (either + food or magic), but one that was indefinitely asleep would be; when + tamable via food, it even caught and ate the food without waking up Fixes to 3.7.0-x General Problems Exposed Via git Repository diff --git a/src/dog.c b/src/dog.c index 5773dcfa6..0794be3d8 100644 --- a/src/dog.c +++ b/src/dog.c @@ -1049,13 +1049,22 @@ dogfood(struct monst *mon, struct obj *obj) } /* - * With the separate mextra structure added in 3.6.x this always - * operates on the original mtmp. It now returns TRUE if the taming - * succeeded. + * tamedog() used to return the monster, which might have changed address + * if a new one was created in order to allocate the edog extension. + * With the separate mextra structure added in 3.6.x it always operates + * on the original mtmp. It now returns TRUE if the taming succeeded. */ boolean tamedog(struct monst *mtmp, struct obj *obj) { + /* reduce timed sleep or paralysis, leaving mtmp->mcanmove as-is + (note: if mtmp is donning armor, this will reduce its busy time) */ + if (mtmp->mfrozen) + mtmp->mfrozen = (mtmp->mfrozen + 1) / 2; + /* end indefinite sleep; using distance==1 limits the waking to mtmp */ + if (mtmp->msleeping) + wake_nearto(mtmp->mx, mtmp->my, 1); /* [different from wakeup()] */ + /* The Wiz, Medusa and the quest nemeses aren't even made peaceful. */ if (mtmp->iswiz || mtmp->data == &mons[PM_MEDUSA] || (mtmp->data->mflags3 & M3_WANTSARTI))