#45953: VisibleWalls value compromised when city becomes fogged Open Date: 2022-10-22 23:14 Last Update: 2022-11-20 19:44 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/45953 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=45953 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2022-11-20 19:44 Updated by: lexxie9952 Comment: I have: https://github.com/Lexxie9952/fcw.org-server/commit/42b4db6a21de76ae54aaf11baf63ff5350cdb03d from February 2021, which should compile identical to your #45063 since all that either of them do is just change 2 bools to int. I had forgotten I had fixed the bool vs. int thing much earlier than you. But that doesn't matter. At time of report, and now, both of our code is the same with the same bug. I hope you aren't mad I reported it. --------------------------------------------------------------------- Ticket Status: Reporter: lexxie9952 Owner: (None) Type: Bugs Status: Open Priority: 5 - Medium MileStone: (None) Component: (None) Severity: 5 - Medium Resolution: None --------------------------------------------------------------------- Ticket details: In a ruleset which uses multiple values for VisibleWalls, in a bitfield such as 1==city walls, 2==coastal defence, 4==,8==,16==sam battery, etc... A city whose walls value was 2112 (64+2048), shows as having a value of 1 when going into fogged vision. The city does not even have 1==city walls, only the 2 improvements for the 64 and 2048 values. How to test in ruleset which only uses "Visible Walls" value=1 for city walls and/or great wall: one can test by making a global "Visible Walls" effect with value = 2112, then moving a unit out of range and watching the city suddenly show as having city walls. I suspect somewhere the value of 2112 is just being saved in a lossy way and being treated as a TRUE which evaluates as 1. And it happens at some point after fog of war takes the tile out of direct vision? I tried to find the bug but got really confused by all the functions for city visibility and sending vs broadcasting, etc. 1 . 2 . 4 . 8 . 16 . 32 . 64 . 128 . 256 . 1024. 2048 -- Ticket information of Freeciv project Freeciv Project is hosted on OSDN Project URL: https://osdn.net/projects/freeciv/ OSDN: https://osdn.net URL for this Ticket: https://osdn.net/projects/freeciv/ticket/45953 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=45953