SF patch 414711: stethoscope fix

Incorporate the submitted stethoscope fix.
This commit is contained in:
cohrs
2003-06-30 01:54:23 +00:00
parent 21b26e867d
commit 00addd7eea
2 changed files with 7 additions and 3 deletions

View File

@@ -95,6 +95,7 @@ when jousting a pudding into a polymorh trap, it was possible to end up
with two of the new type of monster
don't allow polymorphed player to web over the stairs
geographical shopkeeper updates
stethoscope use should be free the first time it's use per player move
Platform- and/or Interface-Specific Fixes

View File

@@ -204,7 +204,8 @@ STATIC_OVL int
use_stethoscope(obj)
register struct obj *obj;
{
static long last_used = 0;
static long last_used_move = -1;
static short last_used_movement = 0;
struct monst *mtmp;
struct rm *lev;
int rx, ry, res;
@@ -218,8 +219,10 @@ use_stethoscope(obj)
}
if (!getdir((char *)0)) return 0;
res = (moves + monstermoves == last_used);
last_used = moves + monstermoves;
res = (moves == last_used_move) &&
(youmonst.movement == last_used_movement);
last_used_move = moves;
last_used_movement = youmonst.movement;
if (u.uswallow && (u.dx || u.dy || u.dz)) {
mstatusline(u.ustuck);