diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 2508f50f22..f9a62892a9 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -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;