mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 22:11:43 +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;
|
floor->m_Speed = height;
|
||||||
case DFloor::floorLowerByValue:
|
case DFloor::floorLowerByValue:
|
||||||
floor->m_Direction = -1;
|
floor->m_Direction = -1;
|
||||||
newheight = sec->floorplane.ZatPoint (0, 0) - height;
|
newheight = sec->floorplane.ZatPoint (sec->soundorg[0], sec->soundorg[1]) - height;
|
||||||
floor->m_FloorDestDist = sec->floorplane.PointToDist (0, 0, newheight);
|
floor->m_FloorDestDist = sec->floorplane.PointToDist (sec->soundorg[0], sec->soundorg[1], newheight);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DFloor::floorRaiseInstant:
|
case DFloor::floorRaiseInstant:
|
||||||
floor->m_Speed = height;
|
floor->m_Speed = height;
|
||||||
case DFloor::floorRaiseByValue:
|
case DFloor::floorRaiseByValue:
|
||||||
floor->m_Direction = 1;
|
floor->m_Direction = 1;
|
||||||
newheight = sec->floorplane.ZatPoint (0, 0) + height;
|
newheight = sec->floorplane.ZatPoint (sec->soundorg[0], sec->soundorg[1]) + height;
|
||||||
floor->m_FloorDestDist = sec->floorplane.PointToDist (0, 0, newheight);
|
floor->m_FloorDestDist = sec->floorplane.PointToDist (sec->soundorg[0], sec->soundorg[1], newheight);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DFloor::floorMoveToValue:
|
case DFloor::floorMoveToValue:
|
||||||
|
|
Loading…
Reference in a new issue