fix(physics): #147 — far-town city/perimeter walls had no collision (portal-less buildings skipped)
A town's outer/perimeter walls have NO collision even on a fresh login: the player walks straight through them while houses block fine. Confirmed NOT a frame issue — #146's bldOrigin probe showed Arwic buildings are correctly framed (~12 m from the player, not km off), so the "#145 far-town frame" premise was wrong here. Root cause (dat-confirmed, Issue147ArwicBuildingsDumpTests): a perimeter wall is stored in LandBlockInfo.Buildings as a doorless shell — 16 of Arwic's 30 buildings are PORTAL-LESS, ringing the town at 24 m intervals (x=12/132, y=12/108). The building-collision cache loop skipped them via `if (building.Portals.Count == 0) continue;` — a filter meant only for the transit/entry feature (CellTransit.CheckBuildingTransit) that also dropped the collision shell. Retail's find_building_collisions (0x006b5300) tests the shell BSP independent of the portal list, so a doorless wall still collides. Fix: don't skip portal-less buildings — cache them with an empty portal list (no transit) but their collision shell (ModelId) intact. User-verified: Arwic perimeter walls now block (Collided/Slid). Adds the dat-dump fixture test. Suites green: Core 1569(+2 skip), App 468(+2 skip), UI 425, Net 317. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
31612e99c3
commit
9743537e62
2 changed files with 77 additions and 1 deletions
|
|
@ -6957,7 +6957,19 @@ public sealed class GameWindow : IDisposable
|
|||
uint lbPrefix = lb.LandblockId & 0xFFFF0000u;
|
||||
foreach (var building in lbInfo.Buildings)
|
||||
{
|
||||
if (building.Portals.Count == 0) continue;
|
||||
// #147 (2026-06-24): do NOT skip portal-less buildings. A town's
|
||||
// PERIMETER WALL is a building with NO portals (you don't enter a
|
||||
// wall segment through a door) — but it still needs its shell BSP
|
||||
// registered for COLLISION. The original skip existed for the
|
||||
// transit/entry feature (CellTransit.CheckBuildingTransit); dropping
|
||||
// the whole building also dropped its collision shell, so a far
|
||||
// town's city walls had ZERO collision and the player walked through
|
||||
// them (Arwic: 16 of 30 buildings are portal-less wall segments
|
||||
// ringing the town at 24 m intervals). Retail collides with a
|
||||
// building's shell regardless of portals — find_building_collisions
|
||||
// (0x006b5300) tests parts[0], independent of the portal list. So a
|
||||
// portal-less building is now cached with an EMPTY portal list (no
|
||||
// transit) but its collision shell (ModelId) intact.
|
||||
|
||||
var bldPortals = new System.Collections.Generic.List<AcDream.Core.Physics.BldPortalInfo>(
|
||||
building.Portals.Count);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue