summaryrefslogtreecommitdiff
path: root/src/ai/default
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-01-09 21:05:03 +0000
committerrubidium <rubidium@openttd.org>2008-01-09 21:05:03 +0000
commit998d7644f6a1b58de0b06d539c0436808b1f1e95 (patch)
tree6b9fc11a0135e1ccdb74151dd8962e4fd5264843 /src/ai/default
parent82fe2885abb359c813908b0c844533bfec2c2b22 (diff)
downloadopenttd-998d7644f6a1b58de0b06d539c0436808b1f1e95.tar.xz
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
Diffstat (limited to 'src/ai/default')
-rw-r--r--src/ai/default/default.cpp4
-rw-r--r--src/ai/default/default.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/ai/default/default.cpp b/src/ai/default/default.cpp
index e3e3e8ba5..6d72f2043 100644
--- a/src/ai/default/default.cpp
+++ b/src/ai/default/default.cpp
@@ -1103,7 +1103,7 @@ static void AiWantTrainRoute(Player *p)
{
uint16 r = GB(Random(), 0, 16);
- _players_ai[p->index].railtype_to_use = GetBestRailtype(p);
+ _players_ai[p->index].railtype_to_use = GetBestRailtype(p->index);
if (r > 0xD000) {
AiWantLongIndustryRoute(p);
@@ -4034,4 +4034,4 @@ void SaveLoad_AI(PlayerID id)
for (int i = 0; i != pai->num_build_rec; i++) {
SlObject(&pai->src + i, _player_ai_build_rec_desc);
}
-} \ No newline at end of file
+}
diff --git a/src/ai/default/default.h b/src/ai/default/default.h
index 9c45d0945..934f96f22 100644
--- a/src/ai/default/default.h
+++ b/src/ai/default/default.h
@@ -3,6 +3,8 @@
#ifndef DEFAULT_H
#define DEFAULT_H
+#include "../../direction_type.h"
+
void AiDoGameLoop(Player*);
void SaveLoad_AI(PlayerID id);