Skip to content

Commit

Permalink
Script: Fix crashes (#1233)
Browse files Browse the repository at this point in the history
  • Loading branch information
EmosewaMC authored Oct 23, 2023
1 parent 5ea06f9 commit 9aa81f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dScripts/02_server/Enemy/AG/BossSpiderQueenEnemyServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ void BossSpiderQueenEnemyServer::SpiderWaveManager(Entity* self) {
for (auto en : hatchList) {
if (en == randomEgg) {
randomEggLoc++;
randomEgg = spiderEggs[randomEggLoc];
randomEgg = spiderEggs.at(randomEggLoc % spiderEggs.size());
}
}

Expand Down Expand Up @@ -288,7 +288,7 @@ void BossSpiderQueenEnemyServer::RunRainOfFire(Entity* self) {

if (index == 0) {
impactList.insert(impactList.end(), spawned.begin(), spawned.end());
} else {
} else if (!spawned.empty()) {
const auto randomIndex = GeneralUtils::GenerateRandomNumber<int32_t>(0, spawned.size() - 1);

impactList.push_back(spawned[randomIndex]);
Expand Down

0 comments on commit 9aa81f9

Please sign in to comment.