Fixed MASpawnThread.updateTargets()
This commit is contained in:
1 parent
753088bdc4
commit
1dc4409857
2 files changed
+7
-2
No files matched your search
Binary file not shown.
@@ -373,12 +373,17 @@ public class MASpawnThread implements Runnable
|
||||
*/
|
||||
public void updateTargets()
|
||||
{
|
||||
Creature c;
|
||||
LivingEntity target;
|
||||
for (Entity e : arena.monsters)
|
||||
{
|
||||
if (arena.livePlayers.contains(((Creature) e).getTarget()))
|
||||
c = (Creature) e;
|
||||
target = c.getTarget();
|
||||
|
||||
if (target instanceof Player && arena.livePlayers.contains(target))
|
||||
continue;
|
||||
|
||||
((Creature) e).setTarget(getClosestPlayer(e));
|
||||
c.setTarget(getClosestPlayer(e));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user