[Freeciv-Dev] Re: (PR#6402) AI focus woes.
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=6402 >
On Sun, 5 Oct 2003 04:47:47 -0700
"Gregory Berkolaiko" <Gregory.Berkolaiko@xxxxxxxxxxxx> wrote:
> 2. the client observing AI should not focus on unsentried units [2]. It
> is highly annoying, I switch off all the auto-center options to observe
> one particular part of the map and the client still jumps back and forth
> when some units decide to go ashore.
If I turn off the local options, I can't really see any map jumping in
AI mode, but we can do this small fix; No focus/map jump in AI mode,
unless you turn on "auto center on units" or "auto center on combat".
Arnstein
Index: client/packhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/packhand.c,v
retrieving revision 1.336
diff -u -r1.336 packhand.c
--- client/packhand.c 2003/10/27 14:25:24 1.336
+++ client/packhand.c 2003/11/14 11:30:18
@@ -936,6 +936,7 @@
/* Wakeup Focus */
if (wakeup_focus
+ && !game.player_ptr->ai.control
&& punit->owner == game.player_idx
&& punit->activity == ACTIVITY_SENTRY
&& packet_unit->activity == ACTIVITY_IDLE
@@ -1158,7 +1159,8 @@
if(repaint_unit)
refresh_tile_mapcanvas(punit->x, punit->y, FALSE);
- if (check_focus || get_unit_in_focus() == NULL)
+ if ((check_focus || get_unit_in_focus() == NULL) &&
+ !game.player_ptr->ai.control)
update_unit_focus();
return ret;
|
|