summaryrefslogtreecommitdiff
path: root/src/ai/trolly
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-04-18 04:37:06 +0000
committerrubidium <rubidium@openttd.org>2008-04-18 04:37:06 +0000
commit9d8fa486af824039fae197212d83365242511da5 (patch)
tree31dd8caca4df193a4a2d7a3cd1ef2974e1a2b5a0 /src/ai/trolly
parent6daaf0fc5565599f9c87b431a69cdcbb91ed74ac (diff)
downloadopenttd-9d8fa486af824039fae197212d83365242511da5.tar.xz
(svn r12761) -Codechange: lots of minor whitespace coding style fixes around operators.
Diffstat (limited to 'src/ai/trolly')
-rw-r--r--src/ai/trolly/pathfinder.cpp2
-rw-r--r--src/ai/trolly/trolly.cpp8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/ai/trolly/pathfinder.cpp b/src/ai/trolly/pathfinder.cpp
index 0928a3a35..e58c92a27 100644
--- a/src/ai/trolly/pathfinder.cpp
+++ b/src/ai/trolly/pathfinder.cpp
@@ -342,7 +342,7 @@ static void AyStar_AiPathFinder_GetNeighbours(AyStar *aystar, OpenListNode *curr
// For now, we check both sides for this tile.. terraforming gives fuzzy result
if (tileh == InclinedSlope(dir)) {
// Now simply check if a tunnel can be build
- ret = AI_DoCommand(tile, (PathFinderInfo->rail_or_road?0:0x200), 0, DC_AUTO, CMD_BUILD_TUNNEL);
+ ret = AI_DoCommand(tile, (PathFinderInfo->rail_or_road ? 0 : 0x200), 0, DC_AUTO, CMD_BUILD_TUNNEL);
tileh = GetTileSlope(_build_tunnel_endtile, NULL);
if (CmdSucceeded(ret) && IsInclinedSlope(tileh)) {
aystar->neighbours[aystar->num_neighbours].tile = _build_tunnel_endtile;
diff --git a/src/ai/trolly/trolly.cpp b/src/ai/trolly/trolly.cpp
index 3df5f06ac..49133386d 100644
--- a/src/ai/trolly/trolly.cpp
+++ b/src/ai/trolly/trolly.cpp
@@ -796,7 +796,7 @@ static void AiNew_State_FindDepot(Player *p)
_players_ainew[p->index].depot_tile = 0;
- for (i=2;i<_players_ainew[p->index].path_info.route_length-2;i++) {
+ for (i = 2; i < _players_ainew[p->index].path_info.route_length - 2; i++) {
tile = _players_ainew[p->index].path_info.route[i];
for (j = DIAGDIR_BEGIN; j < DIAGDIR_END; j++) {
TileIndex t = tile + TileOffsByDiagDir(j);
@@ -819,9 +819,9 @@ static void AiNew_State_FindDepot(Player *p)
while (i > 1 && i < _players_ainew[p->index].path_info.route_length - 2) {
i += g;
g *= -1;
- (g < 0?g--:g++);
+ (g < 0 ? g-- : g++);
- if (_players_ainew[p->index].path_info.route_extra[i] != 0 || _players_ainew[p->index].path_info.route_extra[i+1] != 0) {
+ if (_players_ainew[p->index].path_info.route_extra[i] != 0 || _players_ainew[p->index].path_info.route_extra[i + 1] != 0) {
// Bridge or tunnel.. we can't place a depot there
continue;
}
@@ -949,7 +949,7 @@ static void AiNew_State_VerifyRoute(Player *p)
_players_ainew[p->index].cur_veh = 0;
// Check how much it it going to cost us..
- for (i=0;i<res;i++) {
+ for (i = 0; i < res; i++) {
_players_ainew[p->index].new_cost += AiNew_Build_Vehicle(p, 0, DC_QUERY_COST).GetCost();
}