File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient
Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -399,7 +399,7 @@ void RTS3DScene::Visibility_Check(CameraClass * camera)
399
399
m_translucentObjectsCount=0 ;
400
400
m_numNonOccluderOrOccludee=0 ;
401
401
402
- Int currentFrame= TheGameLogic->getFrame ();
402
+ Int currentFrame = TheGameLogic ? TheGameLogic ->getFrame () : 0 ;
403
403
if (currentFrame <= TheGlobalData->m_defaultOcclusionDelay )
404
404
currentFrame = TheGlobalData->m_defaultOcclusionDelay +1 ; // make sure occlusion is enabled when game starts (frame 0).
405
405
@@ -471,7 +471,7 @@ void RTS3DScene::Visibility_Check(CameraClass * camera)
471
471
m_translucentObjectsBuffer[m_translucentObjectsCount++] = robj;
472
472
}
473
473
else
474
- if (TheGlobalData->m_enableBehindBuildingMarkers && TheGameLogic->getShowBehindBuildingMarkers ())
474
+ if (TheGlobalData->m_enableBehindBuildingMarkers && TheGameLogic && TheGameLogic ->getShowBehindBuildingMarkers ())
475
475
{
476
476
// visible drawable. Check if it's either an occluder or occludee
477
477
if (draw->isKindOf (KINDOF_STRUCTURE) && m_numPotentialOccluders < TheGlobalData->m_maxVisibleOccluderObjects )
Original file line number Diff line number Diff line change @@ -415,7 +415,7 @@ void RTS3DScene::Visibility_Check(CameraClass * camera)
415
415
m_translucentObjectsCount=0 ;
416
416
m_numNonOccluderOrOccludee=0 ;
417
417
418
- Int currentFrame= TheGameLogic->getFrame ();
418
+ Int currentFrame = TheGameLogic ? TheGameLogic ->getFrame () : 0 ;
419
419
if (currentFrame <= TheGlobalData->m_defaultOcclusionDelay )
420
420
currentFrame = TheGlobalData->m_defaultOcclusionDelay +1 ; // make sure occlusion is enabled when game starts (frame 0).
421
421
@@ -490,7 +490,7 @@ void RTS3DScene::Visibility_Check(CameraClass * camera)
490
490
{ drawInfo->m_flags |= DrawableInfo::ERF_IS_TRANSLUCENT; // object is translucent
491
491
m_translucentObjectsBuffer[m_translucentObjectsCount++] = robj;
492
492
}
493
- if (TheGlobalData->m_enableBehindBuildingMarkers && TheGameLogic->getShowBehindBuildingMarkers ())
493
+ if (TheGlobalData->m_enableBehindBuildingMarkers && TheGameLogic && TheGameLogic ->getShowBehindBuildingMarkers ())
494
494
{
495
495
// visible drawable. Check if it's either an occluder or occludee
496
496
if (draw->isKindOf (KINDOF_STRUCTURE) && m_numPotentialOccluders < TheGlobalData->m_maxVisibleOccluderObjects )
You can’t perform that action at this time.
0 commit comments