From 0fd929a53b77739233af66b196079a9eaadd90a0 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 8 Dec 2022 21:20:17 +0100 Subject: [PATCH] fixed the computation of cgi.STUFF --- geometry.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/geometry.cpp b/geometry.cpp index 1a71e336..199fd8fc 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -1020,7 +1020,9 @@ EX namespace geom3 { reduce = (GDIM == 3 ? human_height * .3 : 0); - STUFF = lev_to_factor(0) - max(orbsize * 0.3, zhexf * .6); + int sgn = vid.wall_height > 0 ? 1 : -1; + + STUFF = lev_to_factor(0) - sgn * max(orbsize * 0.3, zhexf * .6); ABODY = lev_to_factor(human_height * .4 - reduce); ALEG0 = lev_to_factor(human_height * .0 - reduce); @@ -1040,7 +1042,7 @@ EX namespace geom3 { LOWSKY = lev_to_factor(2 * wh); HIGH = LOWSKY; HIGH2 = lev_to_factor(3 * wh); - SKY = LOWSKY - (vid.wall_height > 0 ? 5 : -5); + SKY = LOWSKY - sgn * 5; if(geom3::mgclass() == gcSphere && geom3::ggclass() != gcSphere) { ld max_high = lerp(-FLOOR, -1, 0.8);