]> granicus.if.org Git - nethack/commitdiff
U154 - crash on teleport from engulfing mon
authorcohrs <cohrs>
Fri, 22 Nov 2002 03:55:48 +0000 (03:55 +0000)
committercohrs <cohrs>
Fri, 22 Nov 2002 03:55:48 +0000 (03:55 +0000)
teleds now needs to handle the case where an uncarried ball starts out
inactive, but becomes active as a result of teleporting out of a monster
while engulfed.

doc/fixes34.1
src/teleport.c

index 10b88379d73fcee7a96bf0ef475823fc5a1b28dd..f348ba676dedc9e9884ada090be73d0b86c6215e 100644 (file)
@@ -312,6 +312,8 @@ minor experience calculation tweaks
 level telporting out of the dungeon while carrying unpaid shop goods would
        trigger "not on any bill" warnings during final inventory disclosure
 only hard helmets protect against falling piercers
+don't crash teleporting out of a monster while engulfed, punished but not
+       carrying the ball
 
 
 Platform- and/or Interface-Specific Fixes
index 0beb02aa14c26b13edc33995832907e0a4a158f8..755ed3528181f55c46de0bf6c57e71d8fd4dc831 100644 (file)
@@ -266,6 +266,11 @@ boolean allow_drag;
 
        if (u.uswallow) {
                u.uswldtim = u.uswallow = 0;
+               if (Punished && !ball_active) {
+                   /* ensure ball placement, like unstuck */
+                   ball_active = TRUE;
+                   allow_drag = FALSE;
+               }
                docrt();
        }
        if (ball_active) {