- refactored P_FindFloorCeiling to be portal aware and cleaned up its interface.

A big problem with this function was that some flags required setting up some variables before calling it and others did not. It will now set everything up itself so all initializations to AActor::floorz and ceilingz that were made before these calls (which were all identical to begin with) could be removed and the internal initialization logic streamlined.
This commit is contained in:
Christoph Oelckers 2016-02-17 21:57:52 +01:00
commit 884a265d4a
8 changed files with 23 additions and 46 deletions

View file

@ -513,8 +513,6 @@ void AActor::SetOrigin (fixed_t ix, fixed_t iy, fixed_t iz, bool moving)
SetXYZ(ix, iy, iz);
if (moving) SetMovement(ix - X(), iy - Y(), iz - Z());
LinkToWorld ();
floorz = Sector->LowestFloorAt(ix, iy, &floorsector);
ceilingz = Sector->HighestCeilingAt(ix, iy, &ceilingsector);
P_FindFloorCeiling(this, FFCF_ONLYSPAWNPOS);
}