mirror of
https://github.com/ProjectSWGCore/Holocore.git
synced 2026-10-10 00:13:42 -04:00
Optimised statement in CreatureObject.isEnemy()
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user