benilla-re systems structs docs

CMovement::ProbeStepUp

function · collision · primitive

Address
0x636100 · 1296 bytes, up to 0x63660f
Signature
uint32_t __thiscall (CMovement *this, const float *dir, float nx, float ny, float nz)
Meaning
Returns 2 when a step over a face is possible, 1 when blocked, 0 when a sweep fails
Confidence
verified, proof one
Finding
collision/walking#step-up-probe
Test
collision::multipass_difftest, collision::multipass_sweep_miss_difftest

Finding: Step-up probe in collision: walking

0x636100(dir_h, n) tests a step against the face n and returns 0 when a sweep fails, 1 when blocked, 2 when the step is allowed. It saves the position and restores it on 1 and 2; on 0 it stays wherever the probe left it. The reach is s = max(float(r + 1/720), float(H·tan 50°)), r = +0xb0 (0x636147 to 0x636190, held in ebx at 0x636193).

stepsweep and effect
1, only if 0 ≤ n.z ≤ cos 50°s along `−n_h/
2H up: travel u; u < 2^-22 returns 1
3z += u; s along D: travel f; position += D·f
4, if `f − s
5a face still hit and f ≤ r returns 1
6u + 0.01 down: travel d; z −= d
7no floor, n.z > cos 50°, or a nonzero 0x635f80(D, start, float(u − d)): returns 2, storing the start z at +0x80 unless 0x4000000 is set; else 1

The derivation is in the doc.

Callers 1

Callees 9

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