From 381169c3c221bbbbd27ae47cb8f1f083e7be56a0 Mon Sep 17 00:00:00 2001 From: Johxz Date: Tue, 31 Jan 2017 15:25:50 -0600 Subject: [PATCH] fix warningFlashes() of lighting --- Engine/source/T3D/fx/lightning.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Engine/source/T3D/fx/lightning.cpp b/Engine/source/T3D/fx/lightning.cpp index 080bbed820..4885a656c5 100644 --- a/Engine/source/T3D/fx/lightning.cpp +++ b/Engine/source/T3D/fx/lightning.cpp @@ -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++) { @@ -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); }