v3.0.1: fixed crashes when stasised scorpio ally is aggroed on new floor

This commit is contained in:
Evan Debenham
2025-03-06 11:36:31 -05:00
parent 6fc467cf07
commit c04920630a
2 changed files with 6 additions and 2 deletions

View File

@@ -107,7 +107,9 @@ public class GnollTrickster extends Gnoll {
@Override
public void aggro(Char ch) {
//cannot be aggroed to something it can't see
if (ch == null || fieldOfView == null || fieldOfView[ch.pos]) {
//skip this check if FOV isn't initialized
if (ch == null || fieldOfView == null
|| fieldOfView.length != Dungeon.level.length() || fieldOfView[ch.pos]) {
super.aggro(ch);
}
}

View File

@@ -97,7 +97,9 @@ public class Scorpio extends Mob {
@Override
public void aggro(Char ch) {
//cannot be aggroed to something it can't see
if (ch == null || fieldOfView == null || fieldOfView[ch.pos]) {
//skip this check if FOV isn't initialized
if (ch == null || fieldOfView == null
|| fieldOfView.length != Dungeon.level.length() || fieldOfView[ch.pos]) {
super.aggro(ch);
}
}