forked from MagicBane/Server
combat bug fix
This commit is contained in:
@@ -4817,6 +4817,10 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
|
||||
this.safeZone = this.isInSafeZone();
|
||||
|
||||
if(this.isBoxed == false){
|
||||
this. isBoxed = checkIfBoxed(this);
|
||||
}
|
||||
|
||||
if(this.isBoxed && this.containsEffect(1672601862) == false) {//Deathshroud
|
||||
PowersManager.applyPower(this, this, Vector3fImmutable.ZERO, 1672601862, 40, false);
|
||||
}
|
||||
@@ -4832,6 +4836,24 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean checkIfBoxed(PlayerCharacter player){
|
||||
for(PlayerCharacter pc : SessionManager.getAllActivePlayers()){
|
||||
if(pc.isBoxed)
|
||||
continue;
|
||||
|
||||
if(!pc.isActive)
|
||||
continue;
|
||||
|
||||
if(!pc.enteredWorld)
|
||||
continue;
|
||||
|
||||
if(pc.getClientConnection().machineID.equals(player.getClientConnection().machineID) && pc.isBoxed == true)
|
||||
continue;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateFlight() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user