mirror of
https://github.com/OMGeeky/andors-trail.git
synced 2026-01-10 13:42:12 +01:00
Bugfix - Prevent force-close when a monster dies from a lingering actor condition (issue 336). Thanks to Xero from the forums for finding the bug!
This commit is contained in:
@@ -248,9 +248,11 @@ public class ActorStatsController {
|
||||
|
||||
public void applyConditionsToMonsters(PredefinedMap map, boolean isFullRound) {
|
||||
for (MonsterSpawnArea a : map.spawnAreas) {
|
||||
for (Monster m : a.monsters) {
|
||||
applyConditionsToMonster(m, isFullRound);
|
||||
}
|
||||
// Iterate the array backwards, since monsters may get removed from the array inside applyConditionsToMonster.
|
||||
for (int i = a.monsters.size()-1; i >= 0; --i) {
|
||||
final Monster m = a.monsters.get(i);
|
||||
applyConditionsToMonster(m, isFullRound);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user