mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 04:22:34 +00:00
- fixed: plane heighr calculations for Floor_Lower/RaiseByValue should be done at a point that's actually near the affected sector, not at (0,0), otherwise there's a risk of fixed point overflow.
This commit is contained in:
parent
c3047f448e
commit
4eb38f0381
1 changed files with 4 additions and 4 deletions
|
@ -342,16 +342,16 @@ bool EV_DoFloor (DFloor::EFloor floortype, line_t *line, int tag,
|
|||
floor->m_Speed = height;
|
||||
case DFloor::floorLowerByValue:
|
||||
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);
|
||||
break;
|
||||
|
||||
case DFloor::floorRaiseInstant:
|
||||
floor->m_Speed = height;
|
||||
case DFloor::floorRaiseByValue:
|
||||
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);
|
||||
break;
|
||||
|
||||
case DFloor::floorMoveToValue:
|
||||
|
|
Loading…
Reference in a new issue