Fix pet polyed to long worm staying leashed
Long worms cannot be leashed, but polymorphing a leashed pet into a long worm kept it leashed.
This commit is contained in:
@@ -595,7 +595,7 @@ unleash_all()
|
||||
* This ought to exclude various other things, such as lights and gas
|
||||
* spore, is_whirly() critters, ethereal creatures, possibly others.
|
||||
*/
|
||||
static boolean
|
||||
boolean
|
||||
leashable(mtmp)
|
||||
struct monst *mtmp;
|
||||
{
|
||||
|
||||
@@ -3762,6 +3762,9 @@ boolean msg; /* "The oldmon turns into a newmon!" */
|
||||
/* take on the new form... */
|
||||
set_mon_data(mtmp, mdat);
|
||||
|
||||
if (!leashable(mtmp))
|
||||
m_unleash(mtmp, TRUE);
|
||||
|
||||
if (emits_light(olddata) != emits_light(mtmp->data)) {
|
||||
/* used to give light, now doesn't, or vice versa,
|
||||
or light's range has changed */
|
||||
|
||||
Reference in New Issue
Block a user