diff options
author | tron <tron@openttd.org> | 2006-02-18 14:41:24 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-02-18 14:41:24 +0000 |
commit | 49c7eb934be0dc92d640ea3a32c02dddcc83369a (patch) | |
tree | 2b47e6b2c9b73650b42ce6caa2b78f05d91cc03b /ai/trolly | |
parent | 6cfefdb2750d9beccb350ea47db9e2edaa61655c (diff) | |
download | openttd-49c7eb934be0dc92d640ea3a32c02dddcc83369a.tar.xz |
(svn r3613) Some more const, indentation, whitespace and similar stuff
Diffstat (limited to 'ai/trolly')
-rw-r--r-- | ai/trolly/build.c | 3 | ||||
-rw-r--r-- | ai/trolly/pathfinder.c | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/ai/trolly/build.c b/ai/trolly/build.c index 1f56213e0..235166cab 100644 --- a/ai/trolly/build.c +++ b/ai/trolly/build.c @@ -239,8 +239,7 @@ int AiNew_PickVehicle(Player *p) if (!CmdFailed(ret)) break; } // We did not find a vehicle :( - if (CmdFailed(ret)) return -1; - return i; + return CmdFailed(ret) ? -1 : i; } } diff --git a/ai/trolly/pathfinder.c b/ai/trolly/pathfinder.c index 79d1dfc53..1ac4d49cb 100644 --- a/ai/trolly/pathfinder.c +++ b/ai/trolly/pathfinder.c @@ -485,7 +485,7 @@ static int32 AyStar_AiPathFinder_CalculateG(AyStar *aystar, AyStarNode *current, int dir1 = AiNew_GetRailDirection(parent->path.parent->node.tile, parent->path.node.tile, current->tile); int dir2 = AiNew_GetRailDirection(parent->path.parent->parent->node.tile, parent->path.parent->node.tile, parent->path.node.tile); // First, see if we are on diagonal path, that is better than straight path - if (dir1 > 1) { res -= AI_PATHFINDER_DIAGONAL_BONUS; } + if (dir1 > 1) res -= AI_PATHFINDER_DIAGONAL_BONUS; // First see if they are different if (dir1 != dir2) { |