Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#2712 closed defect (fixed)

Mirages visible for AI players

Reported by: mimo Owned by: Itms
Priority: Should Have Milestone: Alpha 17
Component: UI & Simulation Keywords:
Cc: Patch:

Description

There is a problem with the new fogging r15612 when switching players. A simple way to reproduce it is to start a skirmish map with an AI as player 2, send your cavalry in a suicide mission inside the AI city, then switch to the AI perspective and try to delete one of the AI buildings which have been in the LOS of the cavalry: the building will be destroyed, but the mirage will appear at its place, and if we try to destroy the mirage, we get the message that we can't destroy it because in fog-of-war. If now user 2 is set to "not assigned" instead of AI and we repeat all the steps, the behaviour is as expected.

Change History (4)

comment:1 by Itms, 10 years ago

Component: Core engineUI & Simulation
Summary: Problem with latest fogging patch when changing perspectiveMirages visible for AI players

This is (sadly) normal because the AI doesn't have visibility information. There are hard-coded conditionals all across the code that make AI players see everything, regardless of the visibility of these objects.

The only way to destroy the mirage in your example is to make it enter the first player's line of sight. The mirage can be ignored in any case, because it doesn't have obstruction, so your units can pass through it and build on it.

comment:2 by mimo, 10 years ago

Yes, but the point is not to try to destroy the mirage (it was in the ticket description just to be sure this was a mirage). The real problem is that when switching to an AI, we should not see any of the other players mirages.

Certainly something I miss, but what is the connection between the AI not having visibility information and the fact that other players's mirages are rendered when switching to the AI perspective ? I understand that you test in CCmpRangeManager to see if the mirage should be visible for a given player: if (cmpMirage && cmpMirage->GetPlayer() != player) return VIS_HIDDEN; We should have another test which would always return VIS_HIDDEN is the player has no LOS (is an AI).

comment:3 by Itms, 10 years ago

Owner: set to Itms
Resolution: fixed
Status: newclosed

In 15705:

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.

comment:4 by Itms, 10 years ago

Cc: Itms removed
Milestone: BacklogAlpha 17
Note: See TracTickets for help on using tickets.