mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
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:
parent
f4e139485a
commit
1648fc6a07
3 changed files with 6 additions and 3 deletions
|
@ -167,6 +167,7 @@ void ADynamicLight::BeginPlay()
|
|||
|
||||
specialf1 = DAngle(double(SpawnAngle)).Normalized360().Degrees;
|
||||
visibletoplayer = true;
|
||||
mShadowmapIndex = 1024;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
@ -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;
|
||||
|
||||
};
|
||||
|
|
|
@ -35,6 +35,8 @@ class DynamicLight : Actor native
|
|||
Radius 0.1;
|
||||
FloatBobPhase 0;
|
||||
RenderRadius -1;
|
||||
DynamicLight.SpotInnerAngle 10;
|
||||
DynamicLight.SpotOuterAngle 25;
|
||||
+NOBLOCKMAP
|
||||
+NOGRAVITY
|
||||
+FIXMAPTHINGPOS
|
||||
|
|
Loading…
Reference in a new issue