summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tags.cc
diff options
context:
space:
mode:
authorCharles Otto <ottochar@gmail.com>2009-11-15 19:00:18 -0500
committerCharles Otto <ottochar@gmail.com>2009-11-15 23:46:54 -0500
commite2e53f867209b1ae9d9923b9e042796d91677363 (patch)
tree126873d4aad5dcff299719c42b9462ee1c6d807e /crawl-ref/source/tags.cc
parentec62dd87b6bbe338aa50dc503db2f999c2d352c3 (diff)
downloadcrawl-ref-e2e53f867209b1ae9d9923b9e042796d91677363.tar.gz
crawl-ref-e2e53f867209b1ae9d9923b9e042796d91677363.zip
Delay adjustment for sickness
Store total time to recovery instead of turns in you.disease, change you.disease to an integer, update tags and bump TAG_MINOR_VERSION accordingly.
Diffstat (limited to 'crawl-ref/source/tags.cc')
-rw-r--r--crawl-ref/source/tags.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc
index 72c792dbbb..4e1e75c8a1 100644
--- a/crawl-ref/source/tags.cc
+++ b/crawl-ref/source/tags.cc
@@ -965,7 +965,8 @@ static void tag_construct_you(writer &th)
marshallByte(th, you.entry_cause);
marshallByte(th, you.entry_cause_god);
marshallByte(th, you.synch_time);
- marshallByte(th, you.disease);
+
+ marshallLong(th, you.disease);
marshallByte(th, you.species);
marshallShort(th, you.hp);
@@ -1391,7 +1392,11 @@ static void tag_read_you(reader &th, char minorVersion)
you.entry_cause = static_cast<entry_cause_type>( unmarshallByte(th) );
you.entry_cause_god = static_cast<god_type>( unmarshallByte(th) );
you.synch_time = unmarshallByte(th);
- you.disease = unmarshallByte(th);
+ if (minorVersion >= TAG_MINOR_DISEASE)
+ you.disease = unmarshallLong(th);
+ else
+ you.disease = unmarshallByte(th);
+
you.species = static_cast<species_type>(unmarshallByte(th));
you.hp = unmarshallShort(th);
you.hunger = unmarshallShort(th);