fix #Q382 - jumping possible while riding a sleeping pet (trunk only)
From a bug report: when riding,
#jump command and jumping spell didn't check whether steed is able to move.
This makes #jump command, either magic boots or knight's innate ability,
fail if the steed can't move. Spell still succeeds; its magic overrides
steed's immobility. Fix is trunk only since it relies on a function that
isn't in the branch.
Also, tweak hero movement to avoid an extra function call per move
when not riding.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)hack.c 3.5 2006/08/09 */
|
||||
/* SCCS Id: @(#)hack.c 3.5 2007/02/10 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1221,7 +1221,7 @@ domove()
|
||||
}
|
||||
/* not attacking an animal, so we try to move */
|
||||
#ifdef STEED
|
||||
if ((u.dx || u.dy) && stucksteed(FALSE)) {
|
||||
if ((u.dx || u.dy) && u.usteed && stucksteed(FALSE)) {
|
||||
nomul(0);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user