SetWeather
function · lighting · orchestration
- Address
0x67baf0· 276 bytes, up to0x67bc03- Signature
void __thiscall (void *this, int32_t type, float grade, uint8_t smooth)- Meaning
- Sets the weather type and grade and restarts both ramps
- Confidence
- verified, proof one
- Finding
- lighting/weather#weather-message
Finding: Weather message in lighting: weather
The weather message, 0x2f4, carries a u32 type, a float grade, a u32 sound and a byte; the byte at 0 means smooth. SetWeather ignores a type outside 0 to 3. A type that differs from the live one becomes pending. The grade clamps to [0, 1] and becomes the target; the ramp starts from the old target, not from the current grade. Without smooth the current grade jumps to the target and the ramp-now byte is set. The density target is the grade clamped to [0, 0.25], its start the ramp's start value clamped the same way, and both ramps restart now.
The derivation is in the doc.
Callers 6
- CGGameUI::HandlePacket ui
- ConsoleSetWeather terrain
- ConsoleSetWeather2 terrain
- ConsoleSetWeather1 terrain
- ConsoleSetWeather3 terrain
- BuildWeatherManager lighting
Callees 2
- OsGetAsyncTimeMs core
- GetWeatherType lighting
Calls and jumps by a bare address, from tables/calls.tsv.