#4266 closed defect (fixed)
[PATCH] Ex-allies units visible in fog of war after changing the diplomacy
Reported by: | elexis | Owned by: | Itms |
---|---|---|---|
Priority: | Must Have | Milestone: | Alpha 22 |
Component: | UI & Simulation | Keywords: | patch |
Cc: | Patch: |
Description (last modified by )
In this alpha 21 / r18800 replay at minute 48, the blue player (me) declared war on an ally (green player, siole). Many units that were previously visible in siole's field of view were still visible in the fog of war after the diplomacy was changed to enemy (i.e. many (all?) units by the green player and some of the red players units that were seen by the green units). The bug can be reproduced by visually replaying the attached file and selecting the perspective of the blue player.
Attachments (12)
Change History (22)
by , 8 years ago
Attachment: | commands.txt added |
---|
by , 8 years ago
Attachment: | before.jpg added |
---|
by , 8 years ago
by , 8 years ago
comment:1 by , 8 years ago
Description: | modified (diff) |
---|
comment:2 by , 8 years ago
comment:3 by , 8 years ago
Fixed here: https://github.com/wraitii/0ad/commit/0fcf3865d767c4dae0398a2545eaa3d05e512cd5
The problem is that the sharedLos function only thinks the LOS was actually modified if the current allies change the LOS. So if you no longer have any allies it doesn't properly detect it should recompute LOS visibility.
comment:4 by , 8 years ago
Keywords: | patch rfc added |
---|---|
Milestone: | Backlog → Alpha 22 |
Summary: | Ex-allies units visible in fog of war after changing the diplomacy → [PATCH] Ex-allies units visible in fog of war after changing the diplomacy |
The fix above is wrong, even though it would solve the problem in a number of situations by triggering a global visibility update. Here is the proper fix.
Additionally, this patch will improve the performance with respect to the SVN version, by disabling some unwanted visibility dirtying.
by , 8 years ago
Attachment: | dirty-vis-mask.patch added |
---|
by , 7 years ago
Attachment: | invisible_foundation.jpg added |
---|
by , 7 years ago
Attachment: | 2016-11-06_0051.7z added |
---|
Alpha 21 replay with Uran238cz's invisible foundation at 53:50 after allying him
comment:5 by , 7 years ago
comment:8 by , 7 years ago
Keywords: | rfc removed |
---|---|
Milestone: | Work In Progress → Alpha 22 |
I don't think the bug you described here can be explained by the code I fixed here. If you manage to reproduce it, or if you stumble upon it again, create a new ticket :)
by , 7 years ago
Attachment: | screenshot_uran.jpg added |
---|
Uran238cz's city how it actually looked after mutual alliance of Uran238cz and me.
by , 7 years ago
Attachment: | screenshot_elexis.jpg added |
---|
Uran238cz's city as seen from my perspective, immediately after establishing mutual alliance.
by , 7 years ago
Attachment: | screenshot_diff.jpg added |
---|
After reestablishing the mutual alliance, I don't see a number of Uran238cz's buildings (fortress foundation, finished barracks and tower), some trees still appear while they had been gathered out of existance and none of the sheep corpses are seen. Not sure whether the 2 units at the top of the screen disappeared or just moved somewhere else in that 1 second.
comment:9 by , 7 years ago
In that a21 replay, I (player 7) established a mutual alliance with siole (player 1) and Uran238cz (player 2) in the first 10 seconds of the game. siole and Uran never became allies. The shared ally vision was researched in the following 10-11 minutes.
On turn 5594 (46m 37s), Uran declares war on me. On turn 5891 (49m 05s), Uran places the 3 affected barracks, tower (turn 6252) and gathers the affected trees. My ally siole didn't explore those affected entities.
On turn 6413 (53m 25s), I ally Uran. On turn 6416 (53m 28s), Uran places the fortress foundation. On turn 6424 (53m 32s), Uran allies me.
I see the building preview rising, but the foundation is invisible. Until at least min 60 those affected entities stay invisible.
by , 7 years ago
Attachment: | commands_a21_mini.txt added |
---|
Minimalistic alpha 21 replay showing the invisible buildings bug.
by , 7 years ago
Attachment: | commands_a22_mini.txt added |
---|
Reproduce: 1) Start with an ally or make one in the game 2) Explore some units of that ally 3) Declare war on that player
The explored entities will remain visible. This bug exists in alpha 20 too and it apparently doesn't matter whether one sets enemy or neutral.