mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-12-23 22:13:35 +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) {
|
||||
auto movementAIcomp = GetComponent<MovementAIComponent>();
|
||||
if (!movementAIcomp) {
|
||||
movementAIcomp = new MovementAIComponent(this, {});
|
||||
movementAIcomp = new MovementAIComponent(this, MovementAIInfo());
|
||||
m_Components.insert(std::make_pair(eReplicaComponentType::MOVEMENT_AI, movementAIcomp));
|
||||
}
|
||||
movementAIcomp->SetupPath(pathName);
|
||||
|
@ -289,7 +289,7 @@ void SGCannon::OnActivityTimerDone(Entity* self, const std::string& name) {
|
||||
|
||||
auto* movementAI = enemy->GetComponent<MovementAIComponent>();
|
||||
if (!movementAI) {
|
||||
movementAI = new MovementAIComponent(enemy, {});
|
||||
movementAI = new MovementAIComponent(enemy, MovementAIInfo());
|
||||
enemy->AddComponent(eReplicaComponentType::MOVEMENT_AI, movementAI);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user