aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/world.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/world.cpp b/src/world.cpp
index 8c3d2f8..4fe2743 100644
--- a/src/world.cpp
+++ b/src/world.cpp
@@ -747,7 +747,7 @@ singleDetect(Entity *e)
e->handleHits();
// calculate the line that this entity is currently standing on
- l = std::clamp(static_cast<int>((e->loc.x + e->width / 2 - worldStart) / game::HLINE), 0, static_cast<int>(lineCount - 1));
+ l = (e->loc.x + e->width / 2 - worldStart) / game::HLINE;
// if the entity is under the world/line, pop it back to the surface
if (e->loc.y < worldData[l].groundHeight) {