summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--src/beingmanager.cpp2
-rw-r--r--src/game.cpp4
-rw-r--r--src/map.cpp3
4 files changed, 9 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 5a4550f2..48388b16 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-04-22 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/beingmanager.cpp: Fixed a bug, thanks GCC 4.3!
+
2008-04-18 David Athay <ko2fan@gmail.com>
* src/game.cpp, src/openglgraphics.cpp: Mac now uses Apple key for
diff --git a/src/beingmanager.cpp b/src/beingmanager.cpp
index 0619bfc2..11fc1c6d 100644
--- a/src/beingmanager.cpp
+++ b/src/beingmanager.cpp
@@ -75,7 +75,7 @@ Being* BeingManager::createBeing(Uint32 id, Uint16 job)
if (job < 10)
being = new Player(id, job, mMap);
- else if (job >= 100 & job < 200)
+ else if (job >= 100 && job < 200)
being = new NPC(id, job, mMap, mNetwork);
else if (job >= 1000 && job < 1200)
being = new Monster(id, job, mMap);
diff --git a/src/game.cpp b/src/game.cpp
index e963b5d7..7834b42f 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -746,8 +746,8 @@ void Game::handleInput()
player_node->setWalkingDir(direction);
// Attacking monsters
- if ( keyboard.isKeyActive(keyboard.KEY_ATTACK) ||
- joystick && joystick->buttonPressed(0))
+ if (keyboard.isKeyActive(keyboard.KEY_ATTACK) ||
+ (joystick && joystick->buttonPressed(0)))
{
Being *target = NULL;
bool newTarget = keyboard.isKeyActive(keyboard.KEY_TARGET);
diff --git a/src/map.cpp b/src/map.cpp
index c8bdc574..c65b0cd6 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -380,7 +380,8 @@ Path Map::findPath(int startX, int startY, int destX, int destY)
MetaTile *newTile = getMetaTile(x, y);
// Skip if the tile is on the closed list or collides unless its the destination tile
- if (newTile->whichList == mOnClosedList || tileCollides(x, y) && !(x == destX && y == destY))
+ if (newTile->whichList == mOnClosedList ||
+ (tileCollides(x, y) && !(x == destX && y == destY)))
{
continue;
}