]> granicus.if.org Git - nethack/commit
getpos() 'm','M' and 'o','O'
authorPatR <rankin@nethack.org>
Sun, 10 Jan 2016 22:42:06 +0000 (14:42 -0800)
committerPatR <rankin@nethack.org>
Sun, 10 Jan 2016 22:42:06 +0000 (14:42 -0800)
commit9cfc0ac5d7bf2ce9d32f188d60c921deda243231
tree856f9937db0303d817382a89b9d36b76bbc96dd3
parentc902b44b5b0c7be9b412265eb9ffbf7d1ec1c992
getpos() 'm','M' and 'o','O'

Always include the hero's location in the set of spots for 'm',&c to
cycle through.  This way the set will never be empty so checks for that
can be dropped, and choosing initial index becomes trivial (set to 0,
then increment to reach nearest spot of interest or decrement to reach
farthest).  Also, it makes it easier for player to see when successive
'm's,&c have been through all the interesting locations if there are
multiple monsters or objects clumped near the last one in the cycle.
src/do_name.c