Phase 1 simplified per-vertex height as byte * 2.0f, but AC stores heights as byte indices into a 256-entry non-linear float lookup (Region.LandDefs.LandHeightTable). Static object placements in LandBlockInfo use the real table, so terrain rendered with the simplified scale left buildings floating or buried. LandblockMesh.Build now takes an explicit float[] heightTable so the core code stays testable without a DatCollection. GameWindow loads Region id 0x13000000 once at startup and passes its LandDefs.LandHeightTable into every landblock mesh build. The Phase 1 tests use an identity table (i * 2f for i in 0..255) so their expectations remain unchanged. Addresses the 'buildings buried and floating' issue the user observed after the Phase 2a visual checkpoint. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| LandblockMeshTests.cs | ||