Fixed initialization issues with dynamic lights.

Actors get initialized from their defaults so anything done in the constructor or some explicit member initialization will be overwritten.
They must use their properties for setting up configurable fields and do the rest in BeginPlay.
This commit is contained in:
Christoph Oelckers 2018-04-25 09:14:01 +02:00
parent f4e139485a
commit 1648fc6a07
3 changed files with 6 additions and 3 deletions

View File

@ -167,6 +167,7 @@ void ADynamicLight::BeginPlay()
specialf1 = DAngle(double(SpawnAngle)).Normalized360().Degrees;
visibletoplayer = true;
mShadowmapIndex = 1024;
}
//==========================================================================

View File

@ -230,9 +230,9 @@ public:
bool shadowmapped;
int bufferindex;
LightFlags lightflags;
DAngle SpotInnerAngle = 10.0;
DAngle SpotOuterAngle = 25.0;
DAngle SpotInnerAngle;
DAngle SpotOuterAngle;
int mShadowmapIndex = 1024;
int mShadowmapIndex;
};

View File

@ -35,6 +35,8 @@ class DynamicLight : Actor native
Radius 0.1;
FloatBobPhase 0;
RenderRadius -1;
DynamicLight.SpotInnerAngle 10;
DynamicLight.SpotOuterAngle 25;
+NOBLOCKMAP
+NOGRAVITY
+FIXMAPTHINGPOS