diff --git a/src/client/localplayer.cpp b/src/client/localplayer.cpp index 2ea4c5495..4286e48ff 100644 --- a/src/client/localplayer.cpp +++ b/src/client/localplayer.cpp @@ -1196,7 +1196,7 @@ void LocalPlayer::handleAutojump(f32 dtime, Environment *env, bool horizontal_collision = false; for (const auto &colinfo : result.collisions) { - if (colinfo.type == COLLISION_NODE && colinfo.plane != 1) { + if (colinfo.type == COLLISION_NODE && colinfo.axis != COLLISION_AXIS_Y) { horizontal_collision = true; break; // one is enough } diff --git a/src/collision.cpp b/src/collision.cpp index 9fd872eb8..e352b0827 100644 --- a/src/collision.cpp +++ b/src/collision.cpp @@ -509,7 +509,6 @@ collisionMoveResult collisionMoveSimple(Environment *env, IGameDef *gamedef, info.object = nearest_info.obj; info.new_pos = *pos_f; info.old_speed = *speed_f; - info.plane = nearest_collided; // Set the speed component that caused the collision to zero if (step_up) { diff --git a/src/collision.h b/src/collision.h index fa88c469d..67b4735f4 100644 --- a/src/collision.h +++ b/src/collision.h @@ -12,13 +12,13 @@ class IGameDef; class Environment; class ActiveObject; -enum CollisionType +enum CollisionType : u8 { COLLISION_NODE, COLLISION_OBJECT, }; -enum CollisionAxis +enum CollisionAxis : s8 { COLLISION_AXIS_NONE = -1, COLLISION_AXIS_X, @@ -37,9 +37,6 @@ struct CollisionInfo v3f new_pos; v3f old_speed; v3f new_speed; - - // FIXME: this is equivalent to `axis`, why does it exist? - int plane = -1; }; struct collisionMoveResult