fix HWR_SplitWall again..
theres guards just above this which should just skip shit but for some reason the clamps still do stuff, idk man fixes the weird grass fof in green hill
This commit is contained in:
1 parent
400ceae8de
commit
2750f6741f
1 file changed
+7
-7
@@ -1094,11 +1094,11 @@ static void HWR_SplitWall(sector_t *sector, FOutVector *wallVerts, INT32 texnum,
|
||||
else
|
||||
solid = false;
|
||||
|
||||
height = FixedToFloat(P_GetLightZAt(&list[i], v1x, v1y));
|
||||
endheight = FixedToFloat(P_GetLightZAt(&list[i], v2x, v2y));
|
||||
|
||||
if (solid)
|
||||
{
|
||||
height = FixedToFloat(P_GetLightZAt(&list[i], v1x, v1y));
|
||||
endheight = FixedToFloat(P_GetLightZAt(&list[i], v2x, v2y));
|
||||
|
||||
bheight = FixedToFloat(P_GetFFloorBottomZAt(list[i].caster, v1x, v1y));
|
||||
endbheight = FixedToFloat(P_GetFFloorBottomZAt(list[i].caster, v2x, v2y));
|
||||
|
||||
@@ -1128,8 +1128,8 @@ static void HWR_SplitWall(sector_t *sector, FOutVector *wallVerts, INT32 texnum,
|
||||
|
||||
// Found a break
|
||||
// The heights are clamped to ensure the polygon doesn't cross itself.
|
||||
bot = std::max(bheight, realbot);
|
||||
endbot = std::max(endbheight, endrealbot);
|
||||
bot = std::clamp(bheight, realbot, top);
|
||||
endbot = std::clamp(endbheight, endrealbot, endtop);
|
||||
|
||||
Surf->PolyColor.s.alpha = alpha;
|
||||
|
||||
@@ -3702,8 +3702,8 @@ static void HWR_SplitSprite(gl_vissprite_t *spr, const boolean papersprite)
|
||||
|
||||
// Found a break
|
||||
// The heights are clamped to ensure the polygon doesn't cross itself.
|
||||
bot = std::max(bheight, realbot);
|
||||
endbot = std::max(endbheight, endrealbot);
|
||||
bot = std::clamp(bheight, realbot, top);
|
||||
endbot = std::clamp(endbheight, endrealbot, endtop);
|
||||
|
||||
wallVerts[3].t = towtop + ((realtop - top) * towmult);
|
||||
wallVerts[2].t = towtop + ((endrealtop - endtop) * towmult);
|
||||
|
||||
Reference in new issue
Block a user