From: Pasi Kallinen Date: Wed, 14 Mar 2018 18:06:35 +0000 (+0200) Subject: Attempting to open down or at yourself is same as #loot X-Git-Tag: NetHack-3.6.1_RC01~116 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a785663c58038820f63551d8e4a792969d04d311;p=nethack Attempting to open down or at yourself is same as #loot Trying to open at the same location as you did nothing, make it loot instead. Apparently #looting is also annoying when using vi-keys. Based on code by aosdict --- diff --git a/doc/fixes36.1 b/doc/fixes36.1 index 4e616831e..c01208ca7 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -526,6 +526,7 @@ fix 'object lost' panic if hero with lycanthropy but in human form is wielding were-transformation and drop of wielded weapon prevent segfault if pline() is called recursively (which could happen if the interface code issues a debugpline() while processing putstr()) +open at yourself is the same as #loot Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository diff --git a/src/lock.c b/src/lock.c index 426e8a35f..594351124 100644 --- a/src/lock.c +++ b/src/lock.c @@ -630,8 +630,9 @@ int x, y; } else if (!get_adjacent_loc((char *) 0, (char *) 0, u.ux, u.uy, &cc)) return 0; + /* open at yourself/up/down */ if ((cc.x == u.ux) && (cc.y == u.uy)) - return 0; + return doloot(); if (stumble_on_door_mimic(cc.x, cc.y)) return 1;