grid_distance() instead of distance(), as most other pathfinding-related code seems to do so.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6024 c06c8d41-db1a-0410-9941-cceddc491573
REOC4SN5SYUZ6IDLV6I6XZ4MPKE36VAJXLCZ2SXYYZB3RECLXSLQC
VNB7OLRPCC7ITTUKYLQ4SDV25QD2XZHXOYXDCIRJ2OTF2U4VZFWAC
22ORIULMB2NHLFZNJFK2AF275Q6XBKOBE4ZRMOADY64VK5FAUUSQC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
F4FAPEZ5P5CPHZIHUSRYULB3LY4LOJCUC7DZAYVL77LFFBUBCUNAC
U56SICUKK36SJAG3QKV4WGDSAXOW5BELRPZGHTRAMZVUV56AESVAC
VEVPRVWGRHRKBBUTO64ELK3NPZANUQI3ZZ7F23YXJQLKIORUW3HQC
NVSFIV2ZKP44XHCSCXG6OZVGL67OIFINC34J2EMKTA4KULCERUEAC
int current_distance = grid_distance( monster->x, monster->y,
monster->target_x,
monster->target_y );
int current_distance = grid_distance(monster->x, monster->y,
monster->target_x,
monster->target_y);
dist[i] = grid_distance( monster->x + compass_x[newdir],
monster->y + compass_y[newdir],
monster->target_x,
monster->target_y );
dist[i] = grid_distance(monster->x + compass_x[newdir],
monster->y + compass_y[newdir],
monster->target_x,
monster->target_y);