InitLightningRandom
function · gx · orchestration
- Address
0x7af5d0· 13 bytes, up to0x7af5dc- Signature
void __cdecl ()- Meaning
- Seeds the lightning random generator at 0xcf57b0 with 0
- Confidence
- verified, proof one
- Finding
- gx/lightning#bolt-shape
Finding: Bolt shape in gx: lightning
0x7af6d0(points) fills points with the bolt's centre line. With d = end - start, n = ftol(|d| / segment + 2.0) and s = |d| * jitter ([bolt+0x24]), it makes n + 1 points: the first is start, the last is end, and point i from 1 to n - 1 is (start + (d * i) * (1 / n)) + (r1, r2, r3) * s, each r drawn from 0x4531e0 on the file's generator: the low 23 bits of the draw ORed into 0x3f800000 give a float in [1, 2), which becomes f - 2.0 when the draw is non-negative and 2.0 - f when it is negative. Every bolt shares the generator, which starts from seed 0.
The derivation is in the doc.
Callers 1
Callees 1
- NTempest::CRndSeed::SetSeed random
Calls and jumps by a bare address, from tables/calls.tsv.