benilla-re systems structs docs

CParticleEmitter2::RollSpeed

function · models · primitive

Address
0x7b1cc0 · 270 bytes, up to 0x7b1dcd
Signature
float __thiscall (CParticleEmitter2 *this)
Meaning
Returns the emission speed times one plus a signed uniform times the speed variation
Confidence
verified, proof one
Finding
models/emission#speed-and-birth
Test
models::burst_velocity_difftest, models::emit_shape_plane_difftest, models::emit_shape_sphere_difftest, models::emit_shape_spline_difftest, models::emitter_speed_difftest, models::emitter_speed_states_difftest

Finding: Speed and birth in models: emission

Every shape starts a particle the same way: gradient byte 0 and age U·dt, where U is uniform in [0, 1) and dt the substep (0 for a burst). The speed is speed·(1 + S·variation). With m the low 23 bits of a random word w, U = m/2^23 and S = ±(1 − m/2^23), positive when w is negative: S takes the values ±j/2^23, j from 1 to 2^23, so it is never 0 and can be ±1. U is asfloat((w & 0x7fffff) | 0x3f800000) − 1; S takes the same float x in [1, 2) and gives 2 − x in (0, 1] when w is negative, else x − 2 in [−1, 0).

The derivation is in the doc.

Callers 4

Callees 0

None by a direct call or jump.

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