diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2016-05-20 07:44:49 -0400 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2016-05-20 07:44:49 -0400 |
commit | 3d5820da8b91f676a6b5663ff19ccc68c30905ff (patch) | |
tree | 26b3a25290c80aab707c5b0b07382f27f0668488 /src/world.cpp | |
parent | 72941038ae15ed524e2a878d087d98bc97e946b4 (diff) |
bug fixessss
Diffstat (limited to 'src/world.cpp')
-rw-r--r-- | src/world.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/world.cpp b/src/world.cpp index f6df7d6..2931f81 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -1010,7 +1010,7 @@ getNearInteractable(Entity &e) { auto n = std::find_if(std::begin(entity), std::end(entity), [&](Entity *&a) { return ((a->type == MOBT) || (a->type == NPCT) || a->type == MERCHT) && - e.isNear(*a) && (e.left ? (a->loc.x < e.loc.x) : (a->loc.x > e.loc.x)); + e.isNear(a) && (e.left ? (a->loc.x < e.loc.x) : (a->loc.x > e.loc.x)); }); return n == std::end(entity) ? nullptr : *n; @@ -1020,7 +1020,7 @@ Mob *World:: getNearMob(Entity &e) { auto n = std::find_if(std::begin(mob), std::end(mob), [&](Mob *&a) { - return e.isNear(*a) && (e.left ? (a->loc.x < e.loc.x + e.width / 2) : (a->loc.x > e.loc.x + e.width / 2)); + return e.isNear(a) && (e.left ? (a->loc.x < e.loc.x + e.width / 2) : (a->loc.x > e.loc.x + e.width / 2)); }); return n == std::end(mob) ? nullptr : *n; |