From f05e54a08b3a192cb16ebe3c593c6f97d70226b4 Mon Sep 17 00:00:00 2001 From: dolorous Date: Sat, 28 Jun 2008 20:12:19 +0000 Subject: After some pointers from jpeg, rework the routine for monsters' leaving the level to use the pathfinding routines for patrolling. The monsters still sometimes disappear when near the exit instead of on it, which needs to be fixed, but it's vastly closer to working properly. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6186 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/effects.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/effects.cc') diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index cb370633a8..dc7ed52ea4 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -2854,8 +2854,8 @@ void update_level(double elapsedTime) mons_total++; #endif - // Monsters that are leaving the level often do so now. - if (mons_is_leaving(mon) && turns > random2(40) + 21) + // Pacified monsters often leave the level now. + if (mons_is_pacified(mon) && turns > random2(40) + 21) { make_mons_leave_level(mon); continue; -- cgit v1.2.3-54-g00ecf