Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2004:
[Freeciv-Dev] Re: (PR#7408) unit_list_size(&ptile->units) == 0 Again (Se
Home

[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]
To: matusik_s@xxxxx
Subject: [Freeciv-Dev] Re: (PR#7408) unit_list_size(&ptile->units) == 0 Again (Sea barbarians)
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 17 Feb 2004 19:08:59 -0800
Reply-to: rt@xxxxxxxxxxx

<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




[Prev in Thread] Current Thread [Next in Thread]