diff options
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) { |