s_worldFrameTimes
global · terrain
- Address
0xc631c8· 120 bytes, up to0xc6323f- Type
float[30]- Meaning
- Holds the ring of the last 30 frame times
- Confidence
- verified, proof one
- Finding
- terrain/world#smoothed-frame-rate
Finding: Smoothed frame rate in terrain: world
GetSmoothedFrameRate() sums the 30 frame times of the ring 0xc631c8, starting at the write
index 0xc7b488 and wrapping, from 0.0 at 53 bits, and multiplies by 1/30 (0x3d088889). A mean
below 0.001 returns 1000.0; any other, a NaN included, returns 1 / mean unrounded on the stack.
GetFramerate passes it to Lua as a double. The ring holds 0xc62510, the frame seconds, written
by 0x672700 one slot a frame (World frame).
The derivation is in the doc.