Skip to content

Commit

Permalink
Fix bug in relList
Browse files Browse the repository at this point in the history
  • Loading branch information
marksamman committed Sep 23, 2013
1 parent 120043a commit dc0990f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,13 @@ bool Map::placeCreature(const Position& centerPos, Creature* creature, bool exte

{-1, -1}, {0, -1}, {1, -1},
{-1, 0}, {1, 0},
{-1, 1}, {0, 1}, {1, -1}
{-1, 1}, {0, 1}, {1, 1}
};

static std::vector<std::pair<int32_t, int32_t>> normalRelList {
{-1, -1}, {0, -1}, {1, -1},
{-1, 0}, {1, 0},
{-1, 1}, {0, 1}, {1, -1}
{-1, 1}, {0, 1}, {1, 1}
};

std::vector<std::pair<int32_t, int32_t>>& relList = (extendedPos ? extendedRelList : normalRelList);
Expand Down
2 changes: 1 addition & 1 deletion src/monster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ bool Monster::pushItem(Item* item)
static std::vector<std::pair<int32_t, int32_t>> relList {
{-1, -1}, {0, -1}, {1, -1},
{-1, 0}, {1, 0},
{-1, 1}, {0, 1}, {1, -1}
{-1, 1}, {0, 1}, {1, 1}
};
#else
// TODO: Remove this when we no longer support VS2012
Expand Down
2 changes: 1 addition & 1 deletion src/weapons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ bool WeaponDistance::useWeapon(Player* player, Item* item, Creature* target) con
static std::vector<std::pair<int32_t, int32_t>> destList {
{-1, -1}, {0, -1}, {1, -1},
{-1, 0}, {0, 0}, {1, 0},
{-1, 1}, {0, 1}, {1, -1}
{-1, 1}, {0, 1}, {1, 1}
};
#else
// TODO: Remove this when we no longer support VS2012
Expand Down

0 comments on commit dc0990f

Please sign in to comment.