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

Function aLightningTurnOn

scripts/DallasFuncs.cpp:1449–1457  ·  view source on GitHub ↗

$$ACTION Weather Turn lightning ON with frequency of [f:Seconds=5.0] and probability of [p:Probability=0.5] aLightningTurnOn Turn lightning ON Turns on the lightning Parameters: Seconds: How often to check to create lightning Probability: The chance of creating lightning at each check $$END */

Source from the content-addressed store, hash-verified

1447$$END
1448*/
1449void aLightningTurnOn(float check_delay, float prob) {
1450 msafe_struct mstruct;
1451
1452 mstruct.state = true;
1453 mstruct.scalar = check_delay;
1454 mstruct.randval = static_cast<int>(prob * static_cast<float>(RAND_MAX));
1455
1456 MSafe_CallFunction(MSAFE_WEATHER_LIGHTNING, &mstruct);
1457}
1458
1459/*
1460$$ACTION

Callers 8

CallEventMethod · 0.85
CallEventMethod · 0.85
CallEventMethod · 0.85
CallEventMethod · 0.85
CallEventMethod · 0.85
CallEventMethod · 0.85
CallEventMethod · 0.85
CallEventMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected