summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2010-01-10 17:19:24 +0200
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2010-01-10 17:20:33 +0100
commitf5a394a5051384a930d635da22ccafc6beb1cb84 (patch)
treed28fc14408a6bb91170e05880b4d2af6a17fcc14 /src/map.cpp
parent5757066312cab082378dbc5d8df97dea3fe40af0 (diff)
downloadmana-f5a394a5051384a930d635da22ccafc6beb1cb84.tar.gz
mana-f5a394a5051384a930d635da22ccafc6beb1cb84.tar.bz2
mana-f5a394a5051384a930d635da22ccafc6beb1cb84.tar.xz
mana-f5a394a5051384a930d635da22ccafc6beb1cb84.zip
Change code style
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/map.cpp b/src/map.cpp
index db1e9aa2..df03873f 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -230,7 +230,8 @@ void Map::initializeAmbientLayers()
{
name = "overlay" + toString(i);
}
- else {
+ else
+ {
break; // the FOR loop
}
@@ -712,12 +713,14 @@ Path Map::findPath(int startX, int startY, int destX, int destY,
newTile->Gcost = Gcost;
newTile->Fcost = Gcost + newTile->Hcost;
- if (x != destX || y != destY) {
+ if (x != destX || y != destY)
+ {
// Add this tile to the open list
newTile->whichList = mOnOpenList;
openList.push(Location(x, y, newTile));
}
- else {
+ else
+ {
// Target location was found
foundPath = true;
}