mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 05:13:58 -07:00
Supersede the "Reveal all" flag when displaying mirages, to avoid seeing other players' mirages. This is especially problematic when switching perspective to an AI player.
Fixes #2712, thanks mimo for the report and for having looked into the related code. This was SVN commit r15705.
This commit is contained in:
parent
76a5be4c4c
commit
d0472b021b
1 changed files with 5 additions and 5 deletions
|
|
@ -1391,6 +1391,11 @@ public:
|
|||
int i = (pos.X / (int)TERRAIN_TILE_SIZE).ToInt_RoundToNearest();
|
||||
int j = (pos.Y / (int)TERRAIN_TILE_SIZE).ToInt_RoundToNearest();
|
||||
|
||||
// Mirage entities, whatever the situation, are visible for one specific player
|
||||
CmpPtr<ICmpMirage> cmpMirage(ent);
|
||||
if (cmpMirage && cmpMirage->GetPlayer() != player)
|
||||
return VIS_HIDDEN;
|
||||
|
||||
// Reveal flag makes all positioned entities visible
|
||||
if (GetLosRevealAll(player))
|
||||
{
|
||||
|
|
@ -1400,11 +1405,6 @@ public:
|
|||
return VIS_VISIBLE;
|
||||
}
|
||||
|
||||
// Mirage entities, whatever their position, are visible for one specific player
|
||||
CmpPtr<ICmpMirage> cmpMirage(ent);
|
||||
if (cmpMirage && cmpMirage->GetPlayer() != player)
|
||||
return VIS_HIDDEN;
|
||||
|
||||
// Visible if within a visible region
|
||||
CLosQuerier los(GetSharedLosMask(player), m_LosState, m_TerrainVerticesPerSide);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue