#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 , 10 years ago
Component: | Core engine → UI & Simulation |
---|---|
Summary: | Problem with latest fogging patch when changing perspective → Mirages visible for AI players |
comment:2 by , 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:4 by , 10 years ago
Cc: | removed |
---|---|
Milestone: | Backlog → Alpha 17 |
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.