From e3527ec5d93a7b5ff8ad9bb926cc9e1090715a39 Mon Sep 17 00:00:00 2001 From: haranp Date: Tue, 29 Jul 2008 11:26:03 +0000 Subject: Fix bug in shift_monster(). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6714 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/monstuff.cc | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index b28420d6aa..e695b8974b 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -7911,19 +7911,8 @@ bool shift_monster( monsters *mon, int x, int y ) if (x == 0 && y == 0) { - // Try and find a random floor space some distance away. - for (i = 0; i < 50; i++) - { - tx = 5 + random2( GXM - 10 ); - ty = 5 + random2( GYM - 10 ); - - int dist = grid_distance(x, y, tx, ty); - if (grd[tx][ty] == DNGN_FLOOR && dist > 10) - break; - } - - if (i == 50) - return (false); + x = mon->x; + y = mon->y; } for (i = -1; i <= 1; i++) -- cgit v1.2.3-54-g00ecf