Fixed MASpawnThread.updateTargets()

This commit is contained in:
Garbage Mule
2011-07-16 10:15:10 +02:00
parent 753088bdc4
commit 1dc4409857
2 changed files with 7 additions and 2 deletions
BIN
View File
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));
}
}
}