Changeset View
Changeset View
Standalone View
Standalone View
source/simulation2/components/CCmpPathfinder.cpp
Show All 23 Lines | |||||
#include "CCmpPathfinder_Common.h" | #include "CCmpPathfinder_Common.h" | ||||
#include "simulation2/MessageTypes.h" | #include "simulation2/MessageTypes.h" | ||||
#include "simulation2/components/ICmpObstruction.h" | #include "simulation2/components/ICmpObstruction.h" | ||||
#include "simulation2/components/ICmpObstructionManager.h" | #include "simulation2/components/ICmpObstructionManager.h" | ||||
#include "simulation2/components/ICmpTerrain.h" | #include "simulation2/components/ICmpTerrain.h" | ||||
#include "simulation2/components/ICmpWaterManager.h" | #include "simulation2/components/ICmpWaterManager.h" | ||||
#include "simulation2/helpers/HierarchicalPathfinder.h" | |||||
#include "simulation2/helpers/LongPathfinder.h" | |||||
#include "simulation2/helpers/MapEdgeTiles.h" | #include "simulation2/helpers/MapEdgeTiles.h" | ||||
#include "simulation2/helpers/Rasterize.h" | #include "simulation2/helpers/Rasterize.h" | ||||
#include "simulation2/helpers/VertexPathfinder.h" | |||||
#include "simulation2/serialization/SerializedPathfinder.h" | #include "simulation2/serialization/SerializedPathfinder.h" | ||||
#include "simulation2/serialization/SerializedTypes.h" | #include "simulation2/serialization/SerializedTypes.h" | ||||
#include "simulation2/system/Component.h" | |||||
#include "ps/CLogger.h" | #include "ps/CLogger.h" | ||||
#include "ps/CStr.h" | #include "ps/CStr.h" | ||||
#include "ps/Profile.h" | #include "ps/Profile.h" | ||||
#include "ps/XML/Xeromyces.h" | #include "ps/XML/Xeromyces.h" | ||||
#include "renderer/Scene.h" | #include "renderer/Scene.h" | ||||
#include <type_traits> | #include <type_traits> | ||||
REGISTER_COMPONENT_TYPE(Pathfinder) | REGISTER_COMPONENT_TYPE(Pathfinder) | ||||
void CCmpPathfinder::ClassInit(CComponentManager& componentManager) | |||||
{ | |||||
componentManager.SubscribeToMessageType(MT_Deserialized); | |||||
componentManager.SubscribeToMessageType(MT_RenderSubmit); // for debug overlays | |||||
componentManager.SubscribeToMessageType(MT_TerrainChanged); | |||||
componentManager.SubscribeToMessageType(MT_WaterChanged); | |||||
componentManager.SubscribeToMessageType(MT_ObstructionMapShapeChanged); | |||||
} | |||||
IComponent* CCmpPathfinder::Allocate(const ScriptInterface&, JS::HandleValue) | |||||
{ | |||||
return nullptr; | |||||
} | |||||
void CCmpPathfinder::Deallocate(IComponent*) | |||||
{} | |||||
int CCmpPathfinder::GetComponentTypeId() const | |||||
{ | |||||
return CID_Pathfinder; | |||||
} | |||||
void CCmpPathfinder::Init(const CParamNode& UNUSED(paramNode)) | void CCmpPathfinder::Init(const CParamNode& UNUSED(paramNode)) | ||||
{ | { | ||||
m_GridSize = 0; | m_GridSize = 0; | ||||
m_Grid = NULL; | m_Grid = NULL; | ||||
m_TerrainOnlyGrid = NULL; | m_TerrainOnlyGrid = NULL; | ||||
FlushAIPathfinderDirtinessInformation(); | FlushAIPathfinderDirtinessInformation(); | ||||
▲ Show 20 Lines • Show All 492 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator