]> granicus.if.org Git - nethack/commit
Fix travel moving player back and forth infinitely
authorTung Nguyen <tungtn3@gmail.com>
Thu, 10 Mar 2016 13:24:40 +0000 (00:24 +1100)
committerTung Nguyen <tungtn3@gmail.com>
Thu, 10 Mar 2016 13:24:40 +0000 (00:24 +1100)
commit3ed1aedeb73e82e7339e06690524b22c2c79fc78
treedb030cc84f55b5f08c604a2e8756f64a45700347
parent7cf75b707a00c4aede97fe7b9220ec2a6346d147
Fix travel moving player back and forth infinitely

This fixes a bug where hundreds of turns are wasted by the travel system
moving the player back and forth when the player targets an unreachable
space and sight-blocking obstacles occur in certain formations
in-between.  The player will only be stopped if they're interrupted
externally, e.g. growing hungry or being hit by a monster.  See the
comment in the code for full details.

Based on DynaHack commit 02da53e (Fix travel moving player back and
forth repeatedly) by me.
src/hack.c