[Freeciv-Dev] Re: (PR#7408) unit_list_size(&ptile->units) == 0 Again (Se
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=7408 >
Jason Short wrote:
>>The problem is that submarine is invisible because it's invisible, but
>>missile is visible, because it is allied. (There is no shared vision, but
>>player A somehow can see that tile).
>>can_player_see_unit_* functions should check if transporter is
>>visible(because it can be partial invisible unit).
>
>
> So either the submarine should be visible (because it's allied) or the
> missile should be invisible (because it's transported by an invisible unit).
OK, this is wrong. is_hiding_unit is called to check if a unit is in
hiding. This is done separately from the can_player_see_unit_at check,
since some units can see hidden units while others cannot. Hidden units
are specifically "revealed" by a unit within their range, rather than
being "seen" like normal units.
Anyway, the check for is_hiding_unit already checks transporters, so
there is probably no bug here.
jason
|
|