Skip to content

Commit

Permalink
fix warningFlashes() of lighting
Browse files Browse the repository at this point in the history
  • Loading branch information
Johxz committed Jan 31, 2017
1 parent 8b4b467 commit 381169c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Engine/source/T3D/fx/lightning.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand All @@ -742,6 +743,9 @@ void Lightning::warningFlashes()
{
LightningStrikeEvent* pEvent = new LightningStrikeEvent;
pEvent->mLightning = this;

pEvent->mStart.x = strikePoint.x;
pEvent->mStart.y = strikePoint.y;

nc->postNetEvent(pEvent);
}
Expand Down

0 comments on commit 381169c

Please sign in to comment.