Add additional null pointer checks for spot lights
This commit is contained in:
parent
b575ffd36d
commit
92230626c1
1 changed files with 1 additions and 1 deletions
|
|
@ -231,7 +231,7 @@ int DoomLevelMesh::GetLightIndex(FDynamicLight* light, int portalgroup)
|
|||
meshlight.RelativeOrigin = meshlight.Origin;
|
||||
meshlight.Radius = (float)light->GetRadius();
|
||||
meshlight.Intensity = light->target ? (float)light->target->Alpha : 1.0f;
|
||||
if (light->IsSpot())
|
||||
if (light->IsSpot() && light->pSpotInnerAngle && light->pSpotOuterAngle && light->pPitch && light->target)
|
||||
{
|
||||
meshlight.InnerAngleCos = (float)light->pSpotInnerAngle->Cos();
|
||||
meshlight.OuterAngleCos = (float)light->pSpotOuterAngle->Cos();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue