From 3a0c1dfffe30d9adbd55def242524ff64c302d33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Fri, 27 Sep 2019 04:11:52 +0200 Subject: [PATCH] Compute height even for wall pixels --- raycastlib.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/raycastlib.h b/raycastlib.h index c09d280..84400b0 100644 --- a/raycastlib.h +++ b/raycastlib.h @@ -1335,7 +1335,7 @@ void _RCL_columnFunctionComplex(RCL_HitResult *hits, uint16_t hitCount, uint16_t p.depth = distance; p.isFloor = 1; p.texCoords.x = hit.textureCoord; - p.height = 0; // don't compute this, no use + p.height = fZ1World + _RCL_camera.height; // draw floor wall @@ -1365,6 +1365,7 @@ void _RCL_columnFunctionComplex(RCL_HitResult *hits, uint16_t hitCount, uint16_t if (_RCL_ceilFunction != 0 && cPosY < _RCL_camResYLimit) // pixels left? { p.isFloor = 0; + p.height = cZ1World + _RCL_camera.height; limit = _RCL_drawWall(cPosY,cZ1Screen,cZ2Screen, -1,fPosY - 1,