Skip to content

Commit

Permalink
Fix build error
Browse files Browse the repository at this point in the history
  • Loading branch information
marksamman committed Mar 18, 2014
1 parent 57e32b5 commit 708b5e0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/creature.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ struct FindPathParams {
bool clearSight;
bool allowDiagonal;
bool keepDistance;
uint32_t maxSearchDist;
int32_t maxSearchDist;
int32_t minTargetDist;
int32_t maxTargetDist;

Expand Down
2 changes: 1 addition & 1 deletion src/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3700,7 +3700,7 @@ bool Game::getPathToEx(const Creature* creature, const Position& targetPos,

bool Game::getPathToEx(const Creature* creature, const Position& targetPos, std::list<Direction>& dirList,
int32_t minTargetDist, int32_t maxTargetDist, bool fullPathSearch /*= true*/,
bool clearSight /*= true*/, uint32_t maxSearchDist /*= 0*/)
bool clearSight /*= true*/, int32_t maxSearchDist /*= 0*/)
{
FindPathParams fpp;
fpp.fullPathSearch = fullPathSearch;
Expand Down
2 changes: 1 addition & 1 deletion src/game.h
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ class Game

bool getPathToEx(const Creature* creature, const Position& targetPos, std::list<Direction>& dirList,
int32_t minTargetDist, int32_t maxTargetDist, bool fullPathSearch = true,
bool clearSight = true, uint32_t maxSearchDist = 0);
bool clearSight = true, int32_t maxSearchDist = 0);

void changeSpeed(Creature* creature, int32_t varSpeedDelta);
void internalCreatureChangeOutfit(Creature* creature, const Outfit_t& oufit);
Expand Down
6 changes: 2 additions & 4 deletions src/map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -552,8 +552,7 @@ const Tile* Map::canWalkTo(const Creature* creature, const Position& pos)
return tile;
}

bool Map::getPathMatching(const Creature* creature, std::list<Direction>& dirList,
const FrozenPathingConditionCall& pathCondition, const FindPathParams& fpp)
bool Map::getPathMatching(const Creature* creature, std::list<Direction>& dirList, const FrozenPathingConditionCall& pathCondition, const FindPathParams& fpp)
{
Position pos = creature->getPosition();
Position endPos;
Expand Down Expand Up @@ -620,8 +619,7 @@ bool Map::getPathMatching(const Creature* creature, std::list<Direction>& dirLis
continue;
}

if (fpp.maxSearchDist != 0 && (Position::getDistanceX(startPos, pos) > fpp.maxSearchDist ||
Position::getDistanceY(startPos, pos) > fpp.maxSearchDist)) {
if (fpp.maxSearchDist != 0 && (Position::getDistanceX(startPos, pos) > fpp.maxSearchDist || Position::getDistanceY(startPos, pos) > fpp.maxSearchDist)) {
continue;
}

Expand Down

0 comments on commit 708b5e0

Please sign in to comment.