diff --git a/src/p_map.cpp b/src/p_map.cpp index e7aceba78..ec9fea20a 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -4439,6 +4439,9 @@ AActor *P_LinePickActor(AActor *t1, DAngle angle, double distance, DAngle pitch, TData.Caller = t1; TData.hitGhosts = true; + TData.MThruSpecies = false; + TData.ThruActors = false; + TData.ThruSpecies = false; if (Trace(t1->PosAtZ(shootz), t1->Sector, direction, distance, actorMask, wallMask, t1, trace, TRACE_NoSky | TRACE_PortalRestrict, CheckForActor, &TData)) diff --git a/src/po_man.cpp b/src/po_man.cpp index 001f308f1..e449e0d67 100644 --- a/src/po_man.cpp +++ b/src/po_man.cpp @@ -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); } }