diff --git a/src/engine/gameManager/HotzoneManager.java b/src/engine/gameManager/HotzoneManager.java index bd32f150..c2f23f0b 100644 --- a/src/engine/gameManager/HotzoneManager.java +++ b/src/engine/gameManager/HotzoneManager.java @@ -2,6 +2,7 @@ package engine.gameManager; import engine.Enum; import engine.InterestManagement.WorldGrid; +import engine.math.Vector3fImmutable; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.msg.HotzoneChangeMsg; @@ -183,15 +184,13 @@ public class HotzoneManager { Guild nation = pc.guild.getNation(); if(HotzoneManager.playersPresent.containsKey(nation)){ //nation already here, add to list + if(HotzoneManager.playersPresent.get(nation).size() >= 5 && !HotzoneManager.playersPresent.get(nation).contains(pc)){ + //more than 5, boot player out + MovementManager.translocate(pc, Vector3fImmutable.getRandomPointOnCircle(ZoneManager.getZoneByUUID(656).getLoc(),30f),Regions.GetRegionForTeleport(ZoneManager.getZoneByUUID(656).getLoc())); + } if(!HotzoneManager.playersPresent.get(nation).contains(pc)){ - if(HotzoneManager.playersPresent.get(nation).size() >= 5){ - //more than 5, boot player out - pc.setLoc(pc.bindLoc); - pc.teleport(pc.bindLoc); - }else { - //less than 5, allow player in - HotzoneManager.playersPresent.get(nation).add(pc); - } + //less than 5, allow player in + HotzoneManager.playersPresent.get(nation).add(pc); } }else{ ArrayList newList = new ArrayList<>();