Remove duplicated test (already present in IsVisible(player))
(And first test to commit on launchpad with bzr)
This commit is contained in:
parent
245910d651
commit
ae9a692728
1 changed files with 3 additions and 7 deletions
|
@ -921,8 +921,7 @@ public:
|
|||
}
|
||||
|
||||
/**
|
||||
** Returns true, if unit is visible as an action goal for a player
|
||||
** on the map.
|
||||
** Returns true, if unit is visible as an action goal for a player on the map.
|
||||
**
|
||||
** @param player Player to check for.
|
||||
**
|
||||
|
@ -930,15 +929,12 @@ public:
|
|||
*/
|
||||
inline bool IsVisibleAsGoal(const CPlayer *const player) const
|
||||
{
|
||||
//
|
||||
// Invisibility
|
||||
//
|
||||
if (IsInvisibile(player)) {
|
||||
return false;
|
||||
}
|
||||
if ((player->Type == PlayerComputer && !this->Type->PermanentCloak) ||
|
||||
VisCount[player->Index] || IsVisible(player) ||
|
||||
IsVisibleOnRadar(player)) {
|
||||
if ((player->Type == PlayerComputer && !this->Type->PermanentCloak)
|
||||
|| IsVisible(player) || IsVisibleOnRadar(player)) {
|
||||
return IsAliveOnMap();
|
||||
} else {
|
||||
return Type->VisibleUnderFog &&
|
||||
|
|
Loading…
Add table
Reference in a new issue