diff --git a/src/AcDream.App/Rendering/Wb/ObjectMeshManager.cs b/src/AcDream.App/Rendering/Wb/ObjectMeshManager.cs index baa01cf5..03b7dd61 100644 --- a/src/AcDream.App/Rendering/Wb/ObjectMeshManager.cs +++ b/src/AcDream.App/Rendering/Wb/ObjectMeshManager.cs @@ -500,10 +500,25 @@ namespace AcDream.App.Rendering.Wb { if (_dats.Portal.TryGet(envId, out var environment)) { if (environment.Cells.TryGetValue(req.CellStructure, out var cellStruct)) { data = PrepareCellStructMeshData(id, cellStruct, req.Surfaces, Matrix4x4.Identity, CancellationToken.None); + // TEMP diagnostic #105 (strip with fix): a null prep here means + // this deduplicated cell geometry will NEVER render anywhere. + if (data == null) + Console.WriteLine($"[geom-null] prepare-null geom=0x{id:X10} env=0x{envId:X8} cs=0x{req.CellStructure:X4}"); } + else { + Console.WriteLine($"[geom-null] cellstruct-missing geom=0x{id:X10} env=0x{envId:X8} cs=0x{req.CellStructure:X4}"); + } + } + else { + Console.WriteLine($"[geom-null] env-read-failed geom=0x{id:X10} env=0x{envId:X8}"); } } else { + // TEMP diagnostic #105 (strip with fix): an EnvCell geom id (bit 33) + // whose pending request vanished gets misrouted to the generic path, + // where its hash-derived low bits resolve to nothing -> silent null. + if ((id & 0x2_0000_0000UL) != 0) + Console.WriteLine($"[geom-misroute] envcell geom 0x{id:X10} had no pending request — generic path will null it"); // If it's a direct setup or gfxobj, make sure background loads don't abort half-way data = PrepareMeshData(id, isSetup, CancellationToken.None); } @@ -683,6 +698,9 @@ namespace AcDream.App.Rendering.Wb { var renderData = UploadGfxObjMeshData(meshData); if (renderData == null) { + // TEMP diagnostic #105 (strip with fix): the empty substitute is cached in + // _renderData forever -> the object exists but never draws (invisible walls). + Console.WriteLine($"[up-null] upload returned null for 0x{meshData.ObjectId:X10} — caching EMPTY render data (permanently invisible)"); renderData = new ObjectRenderData(); }