When travel destination is one step away the code stops probing for a path and reverts to normal movement, but it wasn't handling the case where the one step was an impossible diagonal except for hero being a grid bug. If the situation was a diagonal that's too narrow to squeeze through, travel would end and regular move would fail. I've rejected the suggested fix and done it differently, without attempting to figure out why the change to end_running() would have been wrong. Clearly it was code that called end_running() which needed to be fixed. The test case was ..x|. ..|@. ..... while carrying enough that directly moving from '@' to 'x' will not be allowed. '@' would move one step south west and then stop because findtravelpath() had ended travel due to single step move. A similar case is ### |x-#- |0@.| where 'x' is a doorway with intact open door and '0' is a boulder. Prior to this fix, player would get "a boulder blocks the way" and not move. After, '@' will move northeast then northwest then west to get into orthogonal position and finally south into the doorway. Even though it definitely fixes both mentioned test cases, I won't be surprised if this results in regressions for other situations. Fixes #487
63 KiB
63 KiB