diff options
author | tron <tron@openttd.org> | 2006-06-27 21:25:53 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-06-27 21:25:53 +0000 |
commit | 2b27073156f40df263cf653263488b8d72a76236 (patch) | |
tree | 1bfdb9c99b43fdc3b07ac13cbed4259a06d34f6f /ai/trolly/pathfinder.c | |
parent | c126ce110ee33bffe07dac5283d8a1648dc662b7 (diff) | |
download | openttd-2b27073156f40df263cf653263488b8d72a76236.tar.xz |
(svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular
Diffstat (limited to 'ai/trolly/pathfinder.c')
-rw-r--r-- | ai/trolly/pathfinder.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ai/trolly/pathfinder.c b/ai/trolly/pathfinder.c index 772ddda46..de3ce2a4e 100644 --- a/ai/trolly/pathfinder.c +++ b/ai/trolly/pathfinder.c @@ -425,12 +425,13 @@ static int32 AyStar_AiPathFinder_CalculateG(AyStar *aystar, AyStarNode *current, res += AI_PATHFINDER_FOUNDATION_PENALTY; } } else { - if (!(IsRoad(parent->path.node.tile) && IsTileType(parent->path.node.tile, MP_TUNNELBRIDGE))) { + if (!IsRoad(parent->path.node.tile) || !IsTileType(parent->path.node.tile, MP_TUNNELBRIDGE)) { r = GetRoadFoundation(parent_tileh, AiNew_GetRoadDirection(parent->path.parent->node.tile, parent->path.node.tile, current->tile)); - if (r >= 15 || r == 0) + if (r >= 15 || r == 0) { res += AI_PATHFINDER_TILE_GOES_UP_PENALTY; - else + } else { res += AI_PATHFINDER_FOUNDATION_PENALTY; + } } } } |