mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- fixed: FPolyObj::RecalcActorFloorCeil altered the floorz of all actors in the same blockmap block as the polyobject, even when they were nowhere near its bounding box.
This fix is still incomplete, it should really discard everything outside the polyobject, not outside its bounding box, but at least it eliminates the most severe occurences of dislocated items.
This commit is contained in:
parent
b2a6512981
commit
6b27d0c3ba
1 changed files with 11 additions and 0 deletions
|
@ -1327,6 +1327,17 @@ void FPolyObj::RecalcActorFloorCeil(FBoundingBox bounds) const
|
|||
|
||||
while ((actor = it.Next()) != NULL)
|
||||
{
|
||||
// skip everything outside the bounding box.
|
||||
if (actor->X() + actor->radius <= bounds.Left() ||
|
||||
actor->X() - actor->radius >= bounds.Right() ||
|
||||
actor->Y() + actor->radius <= bounds.Bottom() ||
|
||||
actor->Y() - actor->radius >= bounds.Top())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
// Todo: Be a little more thorough with what gets altered here
|
||||
// because this can dislocate a lot of items that were spawned on
|
||||
// the lower side of a sector boundary.
|
||||
P_FindFloorCeiling(actor);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue