Fix iron ball being deallocated when saving
When swallowed by an air elemental, going down into a pit placed the attached iron ball on the floor. Saving (or using #wizmakemap) then deallocated the iron ball. Check being swallowed before trying to go down.
This commit is contained in:
@@ -95,6 +95,8 @@ hero polymorphed into a hider and hiding was not unhidden when teleporting
|
||||
impose tighter restraints on 'summon nasties', both for spellcasting monsters
|
||||
and post-Wizard harassment
|
||||
prevent swallowing monster ending up in a solid wall if it killed vault guard
|
||||
fix attached ball getting deallocated if swallowed, going down into a pit,
|
||||
and saving
|
||||
|
||||
|
||||
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
|
||||
|
||||
15
src/do.c
15
src/do.c
@@ -1012,6 +1012,14 @@ dodown()
|
||||
return 1; /* came out of hiding; might need '>' again to go down */
|
||||
}
|
||||
|
||||
if (u.ustuck) {
|
||||
You("are %s, and cannot go down.",
|
||||
!u.uswallow ? "being held" : is_animal(u.ustuck->data)
|
||||
? "swallowed"
|
||||
: "engulfed");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!stairs_down && !ladder_down) {
|
||||
trap = t_at(u.ux, u.uy);
|
||||
if (trap && (uteetering_at_seen_pit(trap) || uescaped_shaft(trap))) {
|
||||
@@ -1027,13 +1035,6 @@ dodown()
|
||||
}
|
||||
}
|
||||
}
|
||||
if (u.ustuck) {
|
||||
You("are %s, and cannot go down.",
|
||||
!u.uswallow ? "being held" : is_animal(u.ustuck->data)
|
||||
? "swallowed"
|
||||
: "engulfed");
|
||||
return 1;
|
||||
}
|
||||
if (on_level(&valley_level, &u.uz) && !u.uevent.gehennom_entered) {
|
||||
You("are standing at the gate to Gehennom.");
|
||||
pline("Unspeakable cruelty and harm lurk down there.");
|
||||
|
||||
Reference in New Issue
Block a user