Bug #2442 » 0001-Allow-activating-units-that-are-not-idle.patch
| client/control.c | ||
|---|---|---|
|
**************************************************************************/
|
||
|
void unit_focus_try(struct unit *punit)
|
||
|
{
|
||
|
if (punit->activity == ACTIVITY_IDLE) {
|
||
|
if (can_unit_do_activity_client(punit, ACTIVITY_IDLE)) {
|
||
|
/* Only idle units can be at focus. */
|
||
|
unit_focus_set(punit);
|
||
|
}
|
||
| client/gui-gtk-4.0/citydlg.c | ||
|---|---|---|
|
player_unit_by_number(client_player(), GPOINTER_TO_INT(data));
|
||
|
if (NULL != punit) {
|
||
|
/* FIXME: If unit is not idle to begin with, we can only request
|
||
|
* idling, and as we have no server reply yet,
|
||
|
* the unit_focus_try() below will fail. */
|
||
|
request_new_unit_activity(punit, ACTIVITY_IDLE);
|
||
|
unit_focus_try(punit);
|
||
|
}
|
||
| ... | ... | |
|
struct city *pcity =
|
||
|
player_city_by_number(client_player(), punit->homecity);
|
||
|
/* FIXME: If unit is not idle to begin with, we can only request
|
||
|
* idling, and as we have no server reply yet,
|
||
|
* the unit_focus_try() below will fail. */
|
||
|
request_new_unit_activity(punit, ACTIVITY_IDLE);
|
||
|
unit_focus_try(punit);
|
||
| ... | ... | |
|
if (NULL != punit) {
|
||
|
struct city *pcity = tile_city(unit_tile(punit));
|
||
|
/* FIXME: If unit is not idle to begin with, we can only request
|
||
|
* idling, and as we have no server reply yet,
|
||
|
* the unit_focus_try() below will fail. */
|
||
|
request_new_unit_activity(punit, ACTIVITY_IDLE);
|
||
|
unit_focus_try(punit);
|
||
| client/gui-gtk-4.0/unitselect.c | ||
|---|---|---|
|
punit = player_unit_by_number(client_player(), uid);
|
||
|
if (punit && unit_owner(punit) == client_player()) {
|
||
|
/* FIXME: If unit is not idle to begin with, we can only request
|
||
|
* idling, and as we have no server reply yet,
|
||
|
* the unit_focus_try() below will fail. */
|
||
|
request_new_unit_activity(punit, ACTIVITY_IDLE);
|
||
|
unit_focus_try(punit);
|
||
|
usdlg_destroy();
|
||
| client/gui-gtk-5.0/citydlg.c | ||
|---|---|---|
|
player_unit_by_number(client_player(), GPOINTER_TO_INT(data));
|
||
|
if (NULL != punit) {
|
||
|
/* FIXME: If unit is not idle to begin with, we can only request
|
||
|
* idling, and as we have no server reply yet,
|
||
|
* the unit_focus_try() below will fail. */
|
||
|
request_new_unit_activity(punit, ACTIVITY_IDLE);
|
||
|
unit_focus_try(punit);
|
||
|
}
|
||
| client/gui-gtk-5.0/unitselect.c | ||
|---|---|---|
|
punit = player_unit_by_number(client_player(), uid);
|
||
|
if (punit && unit_owner(punit) == client_player()) {
|
||
|
/* FIXME: If unit is not idle to begin with, we can only request
|
||
|
* idling, and as we have no server reply yet,
|
||
|
* the unit_focus_try() below will fail. */
|
||
|
request_new_unit_activity(punit, ACTIVITY_IDLE);
|
||
|
unit_focus_try(punit);
|
||
|
usdlg_destroy();
|
||