mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 08:00:42 +00:00
The scene's ground is now its WMO and its terrain, taken in the order the world's queries take map objects and chunks: - Box query (the mover's sweeps, SweepCollider): QueryGroundFacets gathers the WMO's facets, then the terrain's, as 0x006AA8B0 does; a WMO still loading fails it. The terrain leg is the gather's cell math (0x006AA92D: fistp(float(0.24 x float(17066.666 - c)) - 0.5), bounds against 0 and 34133.332) and GatherChunkFacets' wall and triangle legs (0x006AAE2A.. 0x006AB3F1): AddImpassableWalls' quads (0x006AB530, the 32000 immediate at 0x006AB59C), the hole bits (0x008103F8), the five-vertex outcodes against the box grown by 0.019444443 (0x00810468, 0x008101B8) and the four cell triangles (0x00810438). Their planes are Contact::MakeFacet, whose arithmetic is the chunk gather's inline SSE path operand for operand. GatherChunkFacets itself finds its chunk through the global area table (0x00C96318), so it cannot see the scene's chunks. - Segment trace (TraceSegment, area-kit shards): TraceGround traces the WMO, then lets the terrain lower the fraction, as 0x0069BFF0 does. The terrain leg converts the ends to cells as 0x0069C320 does and calls the client's four cell walks (0x0069C4E0, 0x0069C570, 0x0069C600, 0x0069C780), which only fill its scratch list (0x00C962C8, count 0x00C89F40); then TraceListedCells (0x0069C920) over the scene's chunks: the ray relative to each chunk, its four cell triangles (0x0081047C) through IntersectRayTriangle (0x007C2C40, slack immediate at 0x0069CB96), the nearest t*k at or above 0. The normal is PlaneFromTriangle's (as the terrain first hit 0x006AA600 takes it), turned toward the start. The mover's facet context is the scene frame. World::Sweep moved to the scene (SweepGround) so it sweeps against both. A cell outside the scene's chunks has no ground; the world fails or ends there, but the scene's terrain ends at its radius and a WMO may reach past it.