summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.cc
diff options
context:
space:
mode:
authorMatthew Cline <zelgadis@sourceforge.net>2009-11-24 01:00:14 -0800
committerMatthew Cline <zelgadis@sourceforge.net>2009-11-24 03:19:36 -0800
commit2805b3beebfd7913794a412cc5a2d68042051257 (patch)
treedb1ae39d931770bcee89ed11f1f4c9d25a634451 /crawl-ref/source/player.cc
parent6ca662b8cced71f9eb5938519540cd9aa2207c09 (diff)
downloadcrawl-ref-2805b3beebfd7913794a412cc5a2d68042051257.tar.gz
crawl-ref-2805b3beebfd7913794a412cc5a2d68042051257.zip
you.never_die (player::never_die)
If the macros DEBUG or WIZARD are defined, then class player will have the member never_die, which if set to true makes any deadly calls to ouch() return without the game ending.
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r--crawl-ref/source/player.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index fcc151096f..dbc36d491c 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -5484,6 +5484,10 @@ void player::init()
reset_escaped_death();
on_current_level = true;
+
+#if WIZARD || DEBUG
+ you.never_die = false;
+#endif
}
player_save_info player_save_info::operator=(const player& rhs)