Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2000:
[Freeciv-Dev] Re: explore immediately on order
Home

[Freeciv-Dev] Re: explore immediately on order

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: explore immediately on order
From: Jeff Mallatt <jjm@xxxxxxxxxxxx>
Date: Sun, 23 Apr 2000 12:04:44 -0400

All good points.  Attached is a patch which includes them all.

At 2000/04/21 16:19 , Thue Janus Kristensen wrote:
>It seems redundant to send the player *pplayer round with the calls; the
>functions can quickly find it themselves from the unit when they need it.
>It doesn't even seem like the functions are called very often. The player
>should never be another than the unit owner as I understand the code.
>
>in the code block
>
>      int new_target = punit->activity_target;
>      ai_manage_explorer(pplayer, punit);
>      /* ai_manage_explorer sets the activity to idle, so we reset it */
>      if ((punit = find_unit_by_id(id))) {
>       set_unit_activity_targeted(punit, new_activity, new_target);
>
>It would be clearer to just
>set_unit_activity_targeted(punit, ACTIVITY_EXPLORE, new_target);
>
>You send the unit info as
>send_unit_info(pplayer, punit);
>ie only to the unit owner. But everywhere else in the code activity
>changes are sent to all players.
>send_unit_info(0, punit);
>We should only send to the owner, as you have done, and the activity
>should be wiped when sending to non-owners in other cases, but for now
>it should be kept consistent IMO.
>
>nitpicking away...
>-Thue
>
>On Thu, 20 Apr 2000, Jeff Mallatt wrote:
>> 
>> At 2000/04/14 15:38 , Thue Janus Kristensen wrote:
>> >Makes units given an explore order explore immediately
>> 
>> It seemed to me like this belonged in handle_unit_activity_dependencies().
>> So, how's this?
>> 
> 

Attachment: explore_imidiately-2.diff
Description: Text document

jjm

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