U29 - mounting steed gets thru tight spots

Mounting a steed would work even when done diagonally at a doorway,
such as a shop door.  Use test_move to check for all such moves and disallow
the mount in this case.
This commit is contained in:
cohrs
2002-08-30 06:17:41 +00:00
parent 38c663056c
commit 36905aaf96
2 changed files with 5 additions and 2 deletions

View File

@@ -230,8 +230,9 @@ mount_steed(mtmp, force)
}
/* Can the player reach and see the monster? */
if (u.uswallow || u.ustuck || u.utrap || Punished) {
if (Punished)
if (u.uswallow || u.ustuck || u.utrap || Punished ||
!test_move(u.ux, u.uy, mtmp->mx-u.ux, mtmp->my-u.uy, TEST_MOVE)) {
if (Punished || !(u.uswallow || u.ustuck || u.utrap))
You("are unable to swing your %s over.", body_part(LEG));
else
You("are stuck here for now.");