summaryrefslogtreecommitdiff
path: root/src/ai/ai.hpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-01-13 22:58:03 +0000
committersmatz <smatz@openttd.org>2009-01-13 22:58:03 +0000
commite00cf92f47837d26d5b0fffb0668c5c717b3bacc (patch)
tree30732aa7126b9196722d14cee835443a82b9688b /src/ai/ai.hpp
parentcb221d99969240913f61d3bd64e20425568044d2 (diff)
downloadopenttd-e00cf92f47837d26d5b0fffb0668c5c717b3bacc.tar.xz
(svn r15077) -Codechange: enumify DAYS_IN_YEAR and DAYS_IN_LEAP_YEAR
-Change: when computing daily running cost, divide by 365 (instead of 364). Since r12134, the rounding errors don't need this correction anymore
Diffstat (limited to 'src/ai/ai.hpp')
-rw-r--r--src/ai/ai.hpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ai/ai.hpp b/src/ai/ai.hpp
index 9af2e3cf1..71690bc05 100644
--- a/src/ai/ai.hpp
+++ b/src/ai/ai.hpp
@@ -6,6 +6,7 @@
#define AI_HPP
#include "api/ai_event_types.hpp"
+#include "../date_type.h"
#ifndef AI_CONFIG_HPP
struct ltstr { bool operator()(const char *s1, const char *s2) const { return strcmp(s1, s2) < 0; } };
@@ -21,9 +22,9 @@ public:
* The default months AIs start after eachother.
*/
enum StartNext {
- START_NEXT_EASY = 1461,
- START_NEXT_MEDIUM = 730,
- START_NEXT_HARD = 365,
+ START_NEXT_EASY = DAYS_IN_YEAR * 3 + DAYS_IN_LEAP_YEAR,
+ START_NEXT_MEDIUM = DAYS_IN_YEAR * 2,
+ START_NEXT_HARD = DAYS_IN_YEAR,
START_NEXT_MIN = 1,
START_NEXT_MAX = 3600,
START_NEXT_DEVIATION = 60,