Cut 6: allow high-altitude roof-ridge deflection while keeping below-roof wall guard unconditional

This commit is contained in:
Meta Vens 2026-12-05 12:58:36 +01:00
commit 79ac47d769

View file

@ -485,14 +485,17 @@ namespace RustToDust.Core
if (!sampleNow.IsInsideBuildingFootprint && if (!sampleNow.IsInsideBuildingFootprint &&
sampleNext.IsInsideBuildingFootprint && sampleNext.IsInsideBuildingFootprint &&
(!sampleNext.IsBuildingRoof || !pod.AllowFlatRoofLanding)) !sampleNext.IsBuildingRoof)
{ {
return true; return true;
} }
if (!pod.AllowFlatRoofLanding && bool lowOverNextRoof = pod.Phase == OrbitalPodPhase.RetroBurn || pod.Y - sampleNext.SurfaceY < hStop + 6.0f;
if (lowOverNextRoof &&
!pod.AllowFlatRoofLanding &&
sampleNext.IsBuildingRoof && sampleNext.IsBuildingRoof &&
(!sampleNow.IsBuildingRoof || sampleNext.SurfaceY > surfaceNow + 0.25f)) !sampleNow.IsBuildingRoof)
{ {
return true; return true;
} }