From d66750be7914e66930007200f96e649a8a6725b6 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:06:14 +0200 Subject: [PATCH] Fix floor depth --- raycastlib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raycastlib.h b/raycastlib.h index a106c03..8ad02e8 100644 --- a/raycastlib.h +++ b/raycastlib.h @@ -1220,7 +1220,7 @@ Unit coordStep = 1; // draw floor p.isWall = 0; - p.depth = _middleRow * _horizontalDepthStep; + p.depth = (_middleRow - y) * _horizontalDepthStep; while (y < _camera.resolution.y) {