summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-18 17:48:30 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-18 17:48:30 +0000
commit78c7c191e0ca1e9b95f244d5db670ba4b2f23121 (patch)
tree7074668625d80cd1c4747fb38c532346b3eabe56 /crawl-ref/source/player.cc
parentfcf40880a3a0b32d7b83de8e391e0880ab955826 (diff)
downloadcrawl-ref-78c7c191e0ca1e9b95f244d5db670ba4b2f23121.tar.gz
crawl-ref-78c7c191e0ca1e9b95f244d5db670ba4b2f23121.zip
Put the previous check for being undead back in player::rot(), but make
an exception for living vampires, so the effect is the same as before for other undead (oops). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3707 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r--crawl-ref/source/player.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 3342804a75..df4f1314ca 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -6172,9 +6172,15 @@ void player::drain_stat(int stat, int amount, actor* attacker)
void player::rot(actor *who, int rotlevel, int immed_rot)
{
+ if (you.is_undead
+ && (you.species != SP_VAMPIRE || you.hunger_state <= HS_HUNGRY))
+ {
+ return;
+ }
+
if (rotlevel)
- rot_player( rotlevel );
-
+ rot_player(rotlevel);
+
if (immed_rot)
rot_hp(immed_rot);