Changed the way the gaia guardian counts players to try to fix the bug where it would scale for more players than those present.

This commit is contained in:
Vasco Lavos committed 2015-08-27 20:15:29 +01:00
1 parent 548397c767
commit 609aa97a87
1 file changed
+6 -1
@@ -169,7 +169,12 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
e.setMobSpawnTicks(MOB_SPAWN_TICKS);
e.setHardMode(hard);
int playerCount = e.getPlayersAround().size();
List<EntityPlayer> players = e.getPlayersAround();
int playerCount = 0;
for(EntityPlayer p : players)
if(isTruePlayer(p))
playerCount++;
e.setPlayerCount(playerCount);
e.getAttributeMap().getAttributeInstance(SharedMonsterAttributes.maxHealth).setBaseValue(MAX_HP * playerCount);