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:
@@ -1332,6 +1332,12 @@ int magic; /* 0=Physical, otherwise skill level */
|
||||
} else if (!magic && !Jumping) {
|
||||
You_cant("jump very far.");
|
||||
return 0;
|
||||
#ifdef STEED
|
||||
/* if steed is immobile, can't do physical jump but can do spell one */
|
||||
} else if (!magic && u.usteed && stucksteed(FALSE)) {
|
||||
/* stucksteed gave "<steed> won't move" message */
|
||||
return 0;
|
||||
#endif
|
||||
} else if (u.uswallow) {
|
||||
if (magic) {
|
||||
You("bounce around a little.");
|
||||
|
||||
Reference in New Issue
Block a user