From 22e830b9420bb3bb158b9b6ff29712b6ca2e0d37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Mon, 17 Sep 2018 12:36:04 +0200 Subject: [PATCH] Fix floor really --- raycastlib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raycastlib.h b/raycastlib.h index 8ad02e8..a838772 100644 --- a/raycastlib.h +++ b/raycastlib.h @@ -1220,7 +1220,7 @@ Unit coordStep = 1; // draw floor p.isWall = 0; - p.depth = (_middleRow - y) * _horizontalDepthStep; + p.depth = (_camera.resolution.y - y) * _horizontalDepthStep + 1; while (y < _camera.resolution.y) {