summaryrefslogtreecommitdiff
path: root/src/ai/default
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2007-12-16 15:38:51 +0000
committersmatz <smatz@openttd.org>2007-12-16 15:38:51 +0000
commit926fe5c9e9e9fc3fd1b8ed9779812d54ee128adf (patch)
tree3adebd2b8c9a10a6d993c67b0b5920b3598f2bce /src/ai/default
parent8ce9c5f29b52cc9625bdda47594b4fad9e3dd242 (diff)
downloadopenttd-926fe5c9e9e9fc3fd1b8ed9779812d54ee128adf.tar.xz
(svn r11644) -Codechange: merge some functions from tunnel_map.h and bridge_map.h into tunnelbridge_map.h
Diffstat (limited to 'src/ai/default')
-rw-r--r--src/ai/default/default.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ai/default/default.cpp b/src/ai/default/default.cpp
index e84217ddc..671f6a07e 100644
--- a/src/ai/default/default.cpp
+++ b/src/ai/default/default.cpp
@@ -28,8 +28,10 @@
#include "../../bridge.h"
#include "../../date.h"
#include "../../helpers.hpp"
+#include "../../tunnelbridge_map.h"
#include "default.h"
+
// remove some day perhaps?
static uint _ai_service_interval;
@@ -2233,7 +2235,7 @@ static bool AiRemoveTileAndGoForward(Player *p)
} else {
// Check if the bridge points in the right direction.
// This is not really needed the first place AiRemoveTileAndGoForward is called.
- if (DiagDirToAxis(GetBridgeRampDirection(tile)) != (p->ai.cur_dir_a & 1)) return false;
+ if (DiagDirToAxis(GetTunnelBridgeDirection(tile)) != (p->ai.cur_dir_a & 1)) return false;
tile = GetOtherBridgeEnd(tile);
@@ -3733,13 +3735,13 @@ pos_3:
} else if (IsTileType(tile, MP_TUNNELBRIDGE)) {
if (!IsTileOwner(tile, _current_player) ||
!IsBridge(tile) ||
- GetBridgeTransportType(tile) != TRANSPORT_RAIL) {
+ GetTunnelBridgeTransportType(tile) != TRANSPORT_RAIL) {
return;
}
rails = TRACK_BIT_NONE;
- switch (GetBridgeRampDirection(tile)) {
+ switch (GetTunnelBridgeDirection(tile)) {
default:
case DIAGDIR_NE: goto pos_2;
case DIAGDIR_SE: goto pos_3;