invert if else block logic patter

Since setting up the comp will be longer han just adding the path
will make the readability flow better
This commit is contained in:
Aaron Kimbre 2022-11-08 22:06:35 -06:00
parent 2a13d021ee
commit 54e09e3e30

View File

@ -699,10 +699,10 @@ void Entity::Initialize() {
// else if we are a movement path // else if we are a movement path
} else if (path->pathType == PathType::Movement) { } else if (path->pathType == PathType::Movement) {
auto movementAIcomp = GetComponent<MovementAIComponent>(); auto movementAIcomp = GetComponent<MovementAIComponent>();
if (!movementAIcomp){ if (movementAIcomp){
// TODO: create movementAIcomp and set path
} else {
// TODO: set path in existing movementAIComp // TODO: set path in existing movementAIComp
} else {
// TODO: create movementAIcomp and set path
} }
} }
} }