mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
fix warningFlashes() of lighting
This commit is contained in:
parent
8b4b467bff
commit
381169c3c2
|
|
@ -734,6 +734,7 @@ void Lightning::warningFlashes()
|
|||
{
|
||||
AssertFatal(isServerObject(), "Error, client objects may not initiate lightning!");
|
||||
|
||||
Point3F strikePoint( gRandGen.randF( 0.0f, 1.0f ), gRandGen.randF( 0.0f, 1.0f ), 0.0f );
|
||||
|
||||
SimGroup* pClientGroup = Sim::getClientGroup();
|
||||
for (SimGroup::iterator itr = pClientGroup->begin(); itr != pClientGroup->end(); itr++) {
|
||||
|
|
@ -743,6 +744,9 @@ void Lightning::warningFlashes()
|
|||
LightningStrikeEvent* pEvent = new LightningStrikeEvent;
|
||||
pEvent->mLightning = this;
|
||||
|
||||
pEvent->mStart.x = strikePoint.x;
|
||||
pEvent->mStart.y = strikePoint.y;
|
||||
|
||||
nc->postNetEvent(pEvent);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue