diff options
Diffstat (limited to 'src/world.cpp')
-rw-r--r-- | src/world.cpp | 2 |
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) { |