UpdateWeather
function · lighting · primitive
- Address
0x67be40· 779 bytes, up to0x67c14a- Signature
void __thiscall (void *this)- Meaning
- Drives the weather each frame: motion, heading, speed, type changes and ramps
- Confidence
- verified, proof one
- Finding
- lighting/weather#weather-driver
- Test
lighting::wx_67be40_owned_fp_difftest
Finding: Weather driver in lighting: weather
Each frame the driver samples the player's motion, then takes the heading from the player's velocity when its horizontal speed is at least 1 and the unit flag is clear, else from the player's facing; the speed is the player's movement speed while the transport is at most √2 (v² ≤ 2, NaN included), else the transport's horizontal speed. A pending type with live particles and smooth on fades the old effect: the grade ramps toward min(target, 0.25) and each effect is told to stop. Otherwise the effects are torn down and the pending type is built. A grade or density still off its target ramps toward the full target.
The derivation is in the doc.
Callers 1
- CWorld::BeginFrame terrain
Callees 12
- OsGetAsyncTimeMs core
- ClntObjMgrObjectPtr objectlayer
- ClntObjMgrGetActivePlayer objectlayer
- SMemAlloc storm
- Rain::Rain lighting
- Snow::Snow lighting
- Sand::Sand lighting
- DestroyWeatherEffects lighting
- GetWeatherType lighting
- RampWeather lighting
- SampleWeatherMotion lighting
- HasLiveWeather lighting
Calls and jumps by a bare address, from tables/calls.tsv.