summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/acr.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-28 08:27:29 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-28 08:27:29 +0000
commit3205c9289fd9ff8bcf739903a49215f75212128e (patch)
tree6a9b4a29e9e8bd96d4e8b87934d17ce84987a8e0 /crawl-ref/source/acr.cc
parentdc3aa32db050e7923a4e802b874fccd997c1d6c6 (diff)
downloadcrawl-ref-3205c9289fd9ff8bcf739903a49215f75212128e.tar.gz
crawl-ref-3205c9289fd9ff8bcf739903a49215f75212128e.zip
crawl_state now keeps track of whether or not the current code is being
executed because of a god's actions, and if so which god (with "actions" not including god-supplied invocations). Currently only used to prevent Xom from being amused/stimulated by his own actions. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2235 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/acr.cc')
-rw-r--r--crawl-ref/source/acr.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index 2d35510bb4..9a427e6b6f 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -1183,6 +1183,8 @@ bool apply_berserk_penalty = false;
*/
static void input()
{
+ crawl_state.clear_god_acting();
+
if (crawl_state.is_replaying_keys() && crawl_state.is_repeating_cmd()
&& kbhit())
{
@@ -1394,6 +1396,8 @@ static void input()
curr_PlaceInfo += delta;
curr_PlaceInfo.assert_validity();
}
+
+ crawl_state.clear_god_acting();
}
static bool toggle_flag( bool* flag, const char* flagname )
@@ -2604,6 +2608,8 @@ static void check_banished()
static void world_reacts()
{
+ crawl_state.clear_god_acting();
+
if (Options.stash_tracking)
stashes.update_visible_stashes(
Options.stash_tracking == STM_ALL?