diff --git a/raycaster.c b/raycaster.c index 8dad9d5..a99cbb9 100644 --- a/raycaster.c +++ b/raycaster.c @@ -792,10 +792,8 @@ void display() playerDeltaY = sin(playerAngle) * 5.0f; } - // We need to check if we're going to bump into a wall - // and prevent that from happening. - - int movementRestriction = 5; + // We need to check if we're going to bump into a wall and prevent that from happening. + float movementRestriction = mapSize / 4; int xOffset = 0; if (playerDeltaX < 0)