[Freeciv-Dev] (PR#10877) activate all does not work
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=10877 >
> [chrisk - Thu Nov 04 20:24:39 2004]:
>
>
> CVS 04 NOV 2004 S2 GTK2
>
> I have 3 transporters on a tile, all with 3 MP left, deactivated with
> <space> key. The popup offers to 'activate all'. But it does not work.
Only
> one unit wakes up.
This patch makes it work.
Index: client/gui-gtk-2.0/dialogs.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/dialogs.c,v
retrieving revision 1.80
diff -u -r1.80 dialogs.c
--- client/gui-gtk-2.0/dialogs.c 13 Nov 2004 23:35:49 -0000 1.80
+++ client/gui-gtk-2.0/dialogs.c 14 Nov 2004 17:15:07 -0000
@@ -42,6 +42,7 @@
#include "clinet.h"
#include "connectdlg_common.h"
#include "control.h"
+#include "goto.h"
#include "graphics.h"
#include "gui_main.h"
#include "gui_stuff.h"
@@ -1369,9 +1370,17 @@
unit_list_iterate(ptile->units, punit) {
if (game.player_idx == punit->owner) {
- /* Activate this unit. */
pmyunit = punit;
- request_new_unit_activity(punit, ACTIVITY_IDLE);
+
+ /* Activate this unit. */
+ punit->focus_status = FOCUS_AVAIL;
+ if (unit_has_orders(punit)) {
+ request_orders_cleared(punit);
+ }
+ if (punit->activity != ACTIVITY_IDLE || punit->ai.control) {
+ punit->ai.control = FALSE;
+ request_new_unit_activity(punit, ACTIVITY_IDLE);
+ }
}
} unit_list_iterate_end;
|
|