mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
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:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user