summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/env.h
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2010-02-04 12:40:58 +0100
committerAdam Borowski <kilobyte@angband.pl>2010-02-04 13:38:44 +0100
commitbcf4fefef307e1bc7ece7f55fa2ab283a4ec054c (patch)
tree6078b4fda7546835d6e5b71b858443c809874fb8 /crawl-ref/source/env.h
parentf10e23079f552a145cefd8ca2f1ed446502f9bf9 (diff)
downloadcrawl-ref-bcf4fefef307e1bc7ece7f55fa2ab283a4ec054c.tar.gz
crawl-ref-bcf4fefef307e1bc7ece7f55fa2ab283a4ec054c.zip
Extend time counters from 23 bits (float) to 31 bits (int).
In most places, they were stored as doubles (mantissa of 52 bits), but often passed as floats (mantissa 23 bits). Such bugs were present in stabwound's 92M turns game but in that version of Crawl we didn't use absolute counters for much and turn count was (and is) an int so nothing was visibly broken. In current Crawl, it would either crash or trigger an assert due to counters not adding up. This commit drops all abuses of double to store integer values.
Diffstat (limited to 'crawl-ref/source/env.h')
-rw-r--r--crawl-ref/source/env.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/env.h b/crawl-ref/source/env.h
index aa78f2ac0f..13a527a64b 100644
--- a/crawl-ref/source/env.h
+++ b/crawl-ref/source/env.h
@@ -60,7 +60,7 @@ public:
// 5 turns). Set to 0 to stop random generation.
int spawn_random_rate;
- double elapsed_time; // used during level load
+ long elapsed_time; // used during level load
// Number of turns the player has spent on this level.
int turns_on_level;