diff --git a/doc/fixes34.4 b/doc/fixes34.4 index 074291a5b..de8e38476 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -404,6 +404,7 @@ when polymorphed into an opposite sex monster, if you then become a new the weight of a non-cursed bag of holding was sometimes off by 1 unit for number_pad:2 (MSDOS compatibility), M-5 (Alt+5, or Shift+keypad5 using MSDOS/Windows keystroke hackery) didn't function as G movement prefix +objects inside the Wizard's Tower can't be teleport to outside and vica versa Platform- and/or Interface-Specific Fixes diff --git a/src/teleport.c b/src/teleport.c index 688f6a2a8..67870a820 100644 --- a/src/teleport.c +++ b/src/teleport.c @@ -1231,13 +1231,19 @@ register struct obj *obj; ty = rn2(ROWNO); if (!--try_limit) break; } while (!goodpos(tx, ty, (struct monst *)0, 0) || - /* bug: this lacks provision for handling the Wizard's tower */ (restricted_fall && (!within_bounded_area(tx, ty, dndest.lx, dndest.ly, dndest.hx, dndest.hy) || (dndest.nlx && within_bounded_area(tx, ty, dndest.nlx, dndest.nly, - dndest.nhx, dndest.nhy))))); + dndest.nhx, dndest.nhy)))) || + /* on the Wizard Tower levels, objects inside should + stay inside and objects outside should stay outside */ + (dndest.nlx && On_W_tower_level(&u.uz) && + within_bounded_area(tx, ty, dndest.nlx, dndest.nly, + dndest.nhx, dndest.nhy) != + within_bounded_area(otx, oty, dndest.nlx, dndest.nly, + dndest.nhx, dndest.nhy))); if (flooreffects(obj, tx, ty, "fall")) { return FALSE;