diff options
author | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2025-01-10 10:19:02 +0100 |
---|---|---|
committer | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2025-01-10 10:19:02 +0100 |
commit | cb17c2aad3ca8c89d0f6d8305ba4f3a5c3c2a971 (patch) | |
tree | a652b86ac178052320ce7920e9cc450c84173656 /game/enemy/BattleScript.cpp | |
parent | c1325d3e979e294fced8f80ce43dd1eb86d7f5df (diff) |
added to config enemy_pool_max
Diffstat (limited to 'game/enemy/BattleScript.cpp')
-rw-r--r-- | game/enemy/BattleScript.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/game/enemy/BattleScript.cpp b/game/enemy/BattleScript.cpp index 7bea79a..798cbb9 100644 --- a/game/enemy/BattleScript.cpp +++ b/game/enemy/BattleScript.cpp @@ -1,5 +1,5 @@ #include "BattleScript.h" -#include "../enemy/EnemyConfig.h" +#include "EnemyConfig.h" #include "EnemyScript.h" #include "api/Transform.h" #include <crepe/api/AI.h> @@ -41,7 +41,7 @@ void BattleScript::spawn_enemies(int amount) { RefVector<AI> enemy_ai = this->get_components_by_tag<AI>("enemy"); std::uniform_real_distribution<float> dist(70, 150); int spawned = 0; - for (int i = 0; i < 7; i++) { + for (int i = 0; i < ENEMY_POOL_MAX; i++) { AI & ai = enemy_ai[i]; Transform & enemy_transform = this->get_components_by_id<Transform>(ai.game_object_id).front(); |