Ticket #1411: CCmpVisualActor.cpp.patch
File CCmpVisualActor.cpp.patch, 1.6 KB (added by , 11 years ago) |
---|
-
CCmpVisualActor.cpp
153 153 "</element>" 154 154 "</choice>" 155 155 "</element>" 156 "</optional>"; 156 "</optional>" 157 "<element name='VisibleInAtlasOnly'>" 158 "<data type='boolean'/>" 159 "</element>"; 157 160 } 158 161 159 162 virtual void Init(const CParamNode& paramNode) … … 501 504 /// Necessary because the visibility update runs on simulation update, 502 505 /// which may not occur immediately if the game starts paused. 503 506 bool m_PreviouslyRendered; 504 507 bool m_VisibleInAtlasOnly; 505 508 /// Helper function shared by component init and actor reloading 506 509 void InitModel(const CParamNode& paramNode); 507 510 … … 539 542 if (paramNode.GetChild("SilhouetteOccluder").ToBool()) 540 543 modelFlags |= MODELFLAG_SILHOUETTE_OCCLUDER; 541 544 545 const CParamNode& visibleInAtlasNode = paramNode.GetChild("VisibleInAtlasOnly"); 546 547 m_VisibleInAtlasOnly = visibleInAtlasNode.ToBool(); 548 542 549 CmpPtr<ICmpVision> cmpVision(GetSimContext(), GetEntityId()); 543 550 if (cmpVision && cmpVision->GetAlwaysVisible()) 544 551 modelFlags |= MODELFLAG_IGNORE_LOS; … … 831 838 if (culling && !frustum.IsBoxVisible(CVector3D(0, 0, 0), model.GetWorldBoundsRec())) 832 839 return; 833 840 841 // If we are not currently in Atlas, don't submit the model for rendering since the MODELFLAG_VISIBLE_IN_ATLAS_ONLY 842 // is set to true. 843 if(!g_AtlasGameLoop->running && m_VisibleInAtlasOnly) 844 { 845 return; 846 } 847 834 848 collector.SubmitRecursive(&model); 835 849 }