Move most cinematic path simulation data and control from the graphics class to the simulation component and solve the hash mimatch in non-visual replay.

Move graphics code to smaller helper functions UpdateSessionVisibility,
UpdateSilhouettesVisibility and DrawPaths.
Remove the hotkey TODO code which should be implemented differently.
Mark voids as const.

Differential Revision: https://code.wildfiregames.com/D271
Patch By: Vladislav
This was SVN commit r19375.
This commit is contained in:
elexis
2017-04-05 03:59:20 +00:00
parent c0708da215
commit 5d49e6c456
11 changed files with 277 additions and 312 deletions
+6 -2
View File
@@ -40,6 +40,7 @@
#include "renderer/SkyManager.h"
#include "renderer/WaterManager.h"
#include "simulation2/Simulation2.h"
#include "simulation2/components/ICmpCinemaManager.h"
#include "simulation2/components/ICmpObstruction.h"
#include "simulation2/components/ICmpOwnership.h"
#include "simulation2/components/ICmpPlayer.h"
@@ -850,6 +851,7 @@ void CXMLReader::ReadPaths(XMBElement parent)
#undef EL
#undef AT
CmpPtr<ICmpCinemaManager> cmpCinemaManager(*m_MapReader.pSimContext, SYSTEM_ENTITY);
XERO_ITER_EL(parent, element)
{
int elementName = element.GetNodeName();
@@ -922,8 +924,10 @@ void CXMLReader::ReadPaths(XMBElement parent)
return;
}
if (!m_MapReader.pCinema->HasPath(pathName))
m_MapReader.pCinema->AddPath(pathName, path);
if (!cmpCinemaManager)
continue;
if (!cmpCinemaManager->HasPath(pathName))
cmpCinemaManager->AddPath(pathName, path);
else
LOGWARNING("Path with name '%s' already exists", pathName.ToUTF8());
}