benilla-re systems structs docs

CMovement::LandsOnTriangle

function · collision · primitive

Address
0x633720 · 64 bytes, up to 0x63375f
Signature
int __thiscall (CMovement *this, uint32_t index, const float *move)
Meaning
Returns 1 when a listed triangle is floor for the unit under its position plus a move
Confidence
verified, proof one
Finding
collision/airborne#triangle-class-tests
Test
collision::ground_slide_difftest

Finding: Triangle class tests in collision: airborne

For triangle i of 0xc4e52c with normal z = n.z, the slope limit s is cos 50° = 0.64278764 (0x3f248dbb) when 0x5fa550 returns nonzero for the unit, else cos 80° = 0.17364818 (0x3e31d0d4):

functionreturns
0x6336a0(i)1 when −cos 50° ≤ n.z ≤ cos 50°, else 0, NaN included
0x6335d0(i, p)1 when n·p + d is at most 1/12, or NaN, for each of the first three planes 0x632460 builds for i
0x633760(p, i, unit)0 when n.z > s, or NaN, and 0x6335d0(i, p); else 1
0x633720(i, D)1 when 0x633760(+0x10 + D, i, +0x15c) returns 0
0x6333d0(i)1 when a top corner (x ± r, y ± r, z + h) lies within 1/720 of i's plane
0x6334a0(i, &f)n.z > s or NaN: 1, clearing 0x4000000 when 0x6335d0(i, +0x10); n.z ≥ 0: flags & 0x4000000; n.z < 0 without 0x6333d0(i): the same; with it: f = 1 and 0x4000000 cleared if it was set, then 1 when −n.z > cos 50° or NaN, else 0

The derivation is in the doc.

Callers 1

Callees 1

Calls and jumps by a bare address, from tables/calls.tsv.