move stuff around to make it more congruent

This commit is contained in:
Aaron Kimbre 2022-11-08 22:05:02 -06:00
parent b645301867
commit 2a13d021ee

View File

@ -648,11 +648,6 @@ void Entity::Initialize() {
m_Components.insert(std::make_pair(COMPONENT_TYPE_RAIL_ACTIVATOR, new RailActivatorComponent(this, railComponentID)));
}
// need this up here to include in other movement AI setup
std::string pathName = GetVarAsString(u"attached_path");
const Path* path = dZoneManager::Instance()->GetZone()->GetPath(pathName);
int movementAIID = compRegistryTable->GetByIDAndType(m_TemplateID, COMPONENT_TYPE_MOVEMENT_AI);
if (movementAIID > 0) {
CDMovementAIComponentTable* moveAITable = CDClientManager::Instance()->GetTable<CDMovementAIComponentTable>("MovementAIComponent");
@ -692,6 +687,9 @@ void Entity::Initialize() {
m_Components.insert(std::make_pair(COMPONENT_TYPE_MOVEMENT_AI, new MovementAIComponent(this, moveInfo)));
}
std::string pathName = GetVarAsString(u"attached_path");
const Path* path = dZoneManager::Instance()->GetZone()->GetPath(pathName);
//Check to see if we have an attached path and assing the appropiate component to handle it:
if (path){
// if we have a moving platform path, then we need a moving platform component