- floatified p_scroll.cpp

While testing this it became clear that with the higher precision of doubles it has to be avoided at all costs to compare an actor's z position with a value retrieved from ZatPoint to check if it is standing on a floor. There can be some minor variations, depending on what was done with this value. Added isAbove, isBelow and isAtZ checking methods to AActor which properly deal with the problem.
This commit is contained in:
Christoph Oelckers 2016-03-28 21:04:46 +02:00
parent a46a4c81b1
commit 05504b65d2
8 changed files with 105 additions and 73 deletions

View file

@ -3597,7 +3597,8 @@ void AActor::Tick ()
}
DVector3 pos = PosRelative(sec);
height = sec->floorplane.ZatPoint (pos);
if (Z() > height)
double height2 = sec->floorplane.ZatPoint(this);
if (isAbove(height))
{
if (heightsec == NULL)
{