mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-24 06:27:24 +00:00
Script: Fix crashes
This commit is contained in:
parent
23d71340c9
commit
d45e7bbda9
@ -196,7 +196,7 @@ void BossSpiderQueenEnemyServer::SpiderWaveManager(Entity* self) {
|
|||||||
for (auto en : hatchList) {
|
for (auto en : hatchList) {
|
||||||
if (en == randomEgg) {
|
if (en == randomEgg) {
|
||||||
randomEggLoc++;
|
randomEggLoc++;
|
||||||
randomEgg = spiderEggs[randomEggLoc];
|
randomEgg = spiderEggs.at(randomEggLoc % spiderEggs.size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -288,7 +288,7 @@ void BossSpiderQueenEnemyServer::RunRainOfFire(Entity* self) {
|
|||||||
|
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
impactList.insert(impactList.end(), spawned.begin(), spawned.end());
|
impactList.insert(impactList.end(), spawned.begin(), spawned.end());
|
||||||
} else {
|
} else if (!spawned.empty()) {
|
||||||
const auto randomIndex = GeneralUtils::GenerateRandomNumber<int32_t>(0, spawned.size() - 1);
|
const auto randomIndex = GeneralUtils::GenerateRandomNumber<int32_t>(0, spawned.size() - 1);
|
||||||
|
|
||||||
impactList.push_back(spawned[randomIndex]);
|
impactList.push_back(spawned[randomIndex]);
|
||||||
|
Loading…
Reference in New Issue
Block a user