- fixed: AActor::SetPortalTransition set an incorrect value for the previous position.

This commit is contained in:
Christoph Oelckers 2017-02-19 21:35:06 +01:00
parent 65f2433ac7
commit 4ca20e0297

View file

@ -3848,7 +3848,7 @@ void AActor::CheckPortalTransition(bool islinked)
DVector3 oldpos = Pos();
if (islinked && !moved) UnlinkFromWorld(&ctx);
SetXYZ(PosRelative(Sector->GetOppositePortalGroup(sector_t::ceiling)));
Prev = Pos() - oldpos;
Prev += Pos() - oldpos;
Sector = P_PointInSector(Pos());
PrevPortalGroup = Sector->PortalGroup;
moved = true;
@ -3865,7 +3865,7 @@ void AActor::CheckPortalTransition(bool islinked)
DVector3 oldpos = Pos();
if (islinked && !moved) UnlinkFromWorld(&ctx);
SetXYZ(PosRelative(Sector->GetOppositePortalGroup(sector_t::floor)));
Prev = Pos() - oldpos;
Prev += Pos() - oldpos;
Sector = P_PointInSector(Pos());
PrevPortalGroup = Sector->PortalGroup;
moved = true;