]> granicus.if.org Git - nethack/commitdiff
B06005 - cancelling getdir prompt
authorcohrs <cohrs>
Sun, 11 Aug 2002 23:17:23 +0000 (23:17 +0000)
committercohrs <cohrs>
Sun, 11 Aug 2002 23:17:23 +0000 (23:17 +0000)
- Changed a cancelled chat direction to abort the chat -- it seemed odd
that the old behavior would sometimes take time, sometimes not, depending
on the previous direction.
- Documented the current spelleffects behavior of re-using the last
direction after a cancelled getdir() & added a message.

doc/fixes34.1
src/sounds.c
src/spell.c

index 78dce26d18180747e0fd9fe0a5ff1bccb6b4dfd2..66d5faf218377b4ceb8a24c4aac8e641c32be952 100644 (file)
@@ -195,6 +195,7 @@ Archeologists suffer same alignment penalty for statue destruction by
 being unable to see a vault guard doesn't prevent him from arriving
 in town, secret doors should be called "wall", not "fountain"
 in town, watch should not allow trees to be cut down
+cancel chat direction cancels the chat
 
 
 Platform- and/or Interface-Specific Fixes
index 459019d333296f55ae36bc74b20ffb10260af933..32f83c9ce01c722f27825809d31da31e51f57ec3 100644 (file)
@@ -860,7 +860,10 @@ dochat()
        return(1);
     }
 
-    (void) getdir("Talk to whom? (in what direction)");
+    if (!getdir("Talk to whom? (in what direction)")) {
+       /* decided not to chat */
+       return(0);
+    }
 
 #ifdef STEED
     if (u.usteed && u.dz > 0)
index 4c17da74caa760706df6f13841dd333ae4290445..c30cc75bcabd0cd6f971c8f69c143272764681e3 100644 (file)
@@ -814,7 +814,10 @@ boolean atme;
        case SPE_STONE_TO_FLESH:
                if (!(objects[pseudo->otyp].oc_dir == NODIR)) {
                        if (atme) u.dx = u.dy = u.dz = 0;
-                       else (void) getdir((char *)0);
+                       else if (!getdir((char *)0)) {
+                           /* getdir cancelled, re-use previous direction */
+                           pline_The("magical energy is released!");
+                       }
                        if(!u.dx && !u.dy && !u.dz) {
                            if ((damage = zapyourself(pseudo, TRUE)) != 0) {
                                char buf[BUFSZ];