From 5af53c0e623804c56c7a39cda9a22980b3c416a8 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 14 Feb 2016 18:53:00 +0100 Subject: [PATCH] - fixed a few more sector movers which calculated their movement at (0,0) instead of inside the sector. --- src/p_floor.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/p_floor.cpp b/src/p_floor.cpp index c632e8ba27..2a29264606 100644 --- a/src/p_floor.cpp +++ b/src/p_floor.cpp @@ -411,8 +411,8 @@ bool EV_DoFloor (DFloor::EFloor floortype, line_t *line, int tag, case DFloor::floorLowerByTexture: floor->m_Direction = -1; - newheight = sec->floorplane.ZatPoint (0, 0) - sec->FindShortestTextureAround (); - floor->m_FloorDestDist = sec->floorplane.PointToDist (0, 0, newheight); + newheight = sec->floorplane.ZatPoint (sec->soundorg[0], sec->soundorg[1]) - sec->FindShortestTextureAround (); + floor->m_FloorDestDist = sec->floorplane.PointToDist (sec->soundorg[0], sec->soundorg[1], newheight); break; case DFloor::floorLowerToCeiling: @@ -428,14 +428,14 @@ bool EV_DoFloor (DFloor::EFloor floortype, line_t *line, int tag, // since the code is identical to what was here. (Oddly // enough, BOOM preserved the code here even though it // also had this function.) - newheight = sec->floorplane.ZatPoint (0, 0) + sec->FindShortestTextureAround (); - floor->m_FloorDestDist = sec->floorplane.PointToDist (0, 0, newheight); + newheight = sec->floorplane.ZatPoint (sec->soundorg[0], sec->soundorg[1]) + sec->FindShortestTextureAround (); + floor->m_FloorDestDist = sec->floorplane.PointToDist (sec->soundorg[0], sec->soundorg[1], newheight); break; case DFloor::floorRaiseAndChange: floor->m_Direction = 1; - newheight = sec->floorplane.ZatPoint (0, 0) + height; - floor->m_FloorDestDist = sec->floorplane.PointToDist (0, 0, newheight); + newheight = sec->floorplane.ZatPoint (sec->soundorg[0], sec->soundorg[1]) + height; + floor->m_FloorDestDist = sec->floorplane.PointToDist (sec->soundorg[0], sec->soundorg[1], newheight); if (line != NULL) { FTextureID oldpic = sec->GetTexture(sector_t::floor); @@ -618,8 +618,8 @@ bool EV_BuildStairs (int tag, DFloor::EStair type, line_t *line, floor->m_Hexencrush = false; floor->m_Speed = speed; - height = sec->floorplane.ZatPoint (0, 0) + stairstep; - floor->m_FloorDestDist = sec->floorplane.PointToDist (0, 0, height); + height = sec->floorplane.ZatPoint (sec->soundorg[0], sec->soundorg[1]) + stairstep; + floor->m_FloorDestDist = sec->floorplane.PointToDist (sec->soundorg[0], sec->soundorg[1], height); texture = sec->GetTexture(sector_t::floor); osecnum = secnum; //jff 3/4/98 preserve loop index