From 603af1bb92002332f22e6431ad75259cce7bd72b Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 3 Apr 2016 22:13:38 +0200 Subject: [PATCH] - compile bug in gl_sprite and some optimization in gl_walls.cpp --- src/gl/scene/gl_sprite.cpp | 2 +- src/gl/scene/gl_walls.cpp | 23 +++++++++++++++-------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/gl/scene/gl_sprite.cpp b/src/gl/scene/gl_sprite.cpp index 0650e9790b..4414e3874f 100644 --- a/src/gl/scene/gl_sprite.cpp +++ b/src/gl/scene/gl_sprite.cpp @@ -413,7 +413,7 @@ void GLSprite::PerformSpriteClipAdjustment(AActor *thing, const DVector2 &thingp else if (thing->Sector->heightsec && !(thing->Sector->heightsec->MoreFlags & SECF_IGNOREHEIGHTSEC)) { if (thing->flags2&MF2_ONMOBJ && thing->floorz == - thing->Sector->heightsec->floorplane.ZatPoint(thingpos))) + thing->Sector->heightsec->floorplane.ZatPoint(thingpos)) { btm = thing->floorz; top = thing->ceilingz; diff --git a/src/gl/scene/gl_walls.cpp b/src/gl/scene/gl_walls.cpp index d1cc5943ce..043dd215a3 100644 --- a/src/gl/scene/gl_walls.cpp +++ b/src/gl/scene/gl_walls.cpp @@ -1428,15 +1428,22 @@ void GLWall::Process(seg_t *seg, sector_t * frontsector, sector_t * backsector) topplane = frontsector->ceilingplane; bottomplane = frontsector->floorplane; - zfloor[0] = segfront->floorplane.ZatPoint(v1); - zfloor[1] = segfront->floorplane.ZatPoint(v2); - ffh1 = FLOAT2FIXED(zfloor[0]); - ffh2 = FLOAT2FIXED(zfloor[1]); + double v; + v= segfront->floorplane.ZatPoint(v1); + zfloor[0] = v; + ffh1 = FLOAT2FIXED(v); - zceil[0] = segfront->ceilingplane.ZatPoint(v1); - zceil[1] = segfront->ceilingplane.ZatPoint(v2); - fch1 = FLOAT2FIXED(zceil[0]); - fch2 = FLOAT2FIXED(zceil[1]); + v = segfront->floorplane.ZatPoint(v2); + zfloor[1] = v; + ffh2 = FLOAT2FIXED(v); + + v = segfront->ceilingplane.ZatPoint(v1); + zceil[0] = v; + fch1 = FLOAT2FIXED(v); + + v = segfront->ceilingplane.ZatPoint(v2); + zceil[1] = v; + fch2 = FLOAT2FIXED(v); if (seg->linedef->special == Line_Horizon) {