MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / SetLightningState

Function SetLightningState

Descent3/weather.cpp:305–314  ·  view source on GitHub ↗

Sets the state of lightning to on or off, plus allows the setting of how often to check for lightning and the randomness at which lightning happens

Source from the content-addressed store, hash-verified

303// Sets the state of lightning to on or off, plus allows the setting of how often to check
304// for lightning and the randomness at which lightning happens
305void SetLightningState(int on, float interval_time, int randval) {
306 if (on) {
307 Weather.flags |= WEATHER_FLAGS_LIGHTNING;
308 Weather.lightning_sequence = 0;
309 Weather.lightning_rand_value = randval;
310 Weather.lightning_interval_time = interval_time;
311 } else {
312 Weather.flags &= ~WEATHER_FLAGS_LIGHTNING;
313 }
314}

Callers 1

msafe_CallFunctionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected