summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorxemplum <morxemplum+github@gmail.com>2020-11-30 15:54:08 -0700
committerMorxemplum <morxemplum+github@gmail.com>2020-11-30 15:54:08 -0700
commit4a685ec65571ea146cab8fece4c6828cabd2f11e (patch)
tree798e8e076feba80221845ce49704542037e22c04
parent92974445c1174cba3b9fc522227314d9c5800a32 (diff)
Out of bounds check slightly redone... again2.0.3_wrap_up
-rw-r--r--src/SSVOpenHexagon/Components/CWall.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/SSVOpenHexagon/Components/CWall.cpp b/src/SSVOpenHexagon/Components/CWall.cpp
index 93da37ed..8f9f834d 100644
--- a/src/SSVOpenHexagon/Components/CWall.cpp
+++ b/src/SSVOpenHexagon/Components/CWall.cpp
@@ -58,7 +58,7 @@ void CWall::moveTowardsCenter(
const float wallSpawnDist{mHexagonGame.getLevelStatus().wallSpawnDistance};
const float radius{mHexagonGame.getRadius() * 0.65f};
- const float outerBounds = wallSpawnDist * 0.7f;
+ const float outerBounds = wallSpawnDist * 1.1f;
int pointsOnCenter{0};
int pointsOutOfBounds{0};
@@ -71,7 +71,7 @@ void CWall::moveTowardsCenter(
}
else
{
- if(std::abs(vp.x - mCenterPos.x) > outerBounds &&
+ if(std::abs(vp.x - mCenterPos.x) > outerBounds ||
std::abs(vp.y - mCenterPos.y) > outerBounds)
{
++pointsOutOfBounds;