From dc3f573c6ef467ddcc4a837ce90ca9df3b502c2e Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Thu, 5 Nov 2009 20:50:54 +0100 Subject: Unify mesmerisation code. There were several places that had copies of the same code, checking whether mesmerisation blocked movement to a given target. The various mesmerisation functions have become methods of player and were moved into behold.cc. --- crawl-ref/source/misc.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'crawl-ref/source/misc.cc') diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index 9f10f2ad3c..bdfd78fbe0 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -2580,11 +2580,7 @@ void down_stairs( int old_level, dungeon_feature_type force_stair, } // Clear list of beholding monsters. - if (you.duration[DUR_MESMERISED]) - { - you.mesmerised_by.clear(); - you.duration[DUR_MESMERISED] = 0; - } + you.clear_beholders(); if (you.skills[SK_TRANSLOCATIONS] > 0 && !allow_control_teleport( true )) mpr( "You sense a powerful magical force warping space.", MSGCH_WARN ); -- cgit v1.2.3-54-g00ecf