mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-15 04:38:21 +00:00
Use proper initializer
This commit is contained in:
parent
1d4d1414e9
commit
cceaa96415
@ -710,7 +710,7 @@ void Entity::Initialize() {
|
|||||||
} else if (path->pathType == PathType::Movement) {
|
} else if (path->pathType == PathType::Movement) {
|
||||||
auto movementAIcomp = GetComponent<MovementAIComponent>();
|
auto movementAIcomp = GetComponent<MovementAIComponent>();
|
||||||
if (!movementAIcomp) {
|
if (!movementAIcomp) {
|
||||||
movementAIcomp = new MovementAIComponent(this, {});
|
movementAIcomp = new MovementAIComponent(this, MovementAIInfo());
|
||||||
m_Components.insert(std::make_pair(eReplicaComponentType::MOVEMENT_AI, movementAIcomp));
|
m_Components.insert(std::make_pair(eReplicaComponentType::MOVEMENT_AI, movementAIcomp));
|
||||||
}
|
}
|
||||||
movementAIcomp->SetupPath(pathName);
|
movementAIcomp->SetupPath(pathName);
|
||||||
|
@ -289,7 +289,7 @@ void SGCannon::OnActivityTimerDone(Entity* self, const std::string& name) {
|
|||||||
|
|
||||||
auto* movementAI = enemy->GetComponent<MovementAIComponent>();
|
auto* movementAI = enemy->GetComponent<MovementAIComponent>();
|
||||||
if (!movementAI) {
|
if (!movementAI) {
|
||||||
movementAI = new MovementAIComponent(enemy, {});
|
movementAI = new MovementAIComponent(enemy, MovementAIInfo());
|
||||||
enemy->AddComponent(eReplicaComponentType::MOVEMENT_AI, movementAI);
|
enemy->AddComponent(eReplicaComponentType::MOVEMENT_AI, movementAI);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user