mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-21 21:17:25 +00:00
Script: Fix crashes (#1233)
This commit is contained in:
parent
5ea06f9bda
commit
9aa81f95cc
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
@ -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]);
|
||||
|
Loading…
Reference in New Issue
Block a user