Optimised statement in CreatureObject.isEnemy()

This commit is contained in:
Mads Boddum
2016-09-16 04:26:25 +02:00
parent cc9a8730c5
commit ce549ed073
@@ -780,11 +780,7 @@ public class CreatureObject extends TangibleObject {
// If they're both players, both of them might be special force
if (thisCreature.isPlayer() && otherCreature.isPlayer()) {
// They are enemies if they're both players and members of the special force!
if (getPvpStatus() == PvpStatus.SPECIALFORCES && otherObject.getPvpStatus() == PvpStatus.SPECIALFORCES) {
return true;
} else { // Two players where at least one isn't SF does not make them enemies
return false;
}
return getPvpStatus() == PvpStatus.SPECIALFORCES && otherObject.getPvpStatus() == PvpStatus.SPECIALFORCES;
}
}
}