Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. *Read more...*

Feature #876839 ยป 0003-Don-t-send-unit_change_activity-directly.patch

Sveinung Kvilhaugsvik, 2020-06-07 06:39 PM

View differences:

client/control.c
pcargo->id, ptrans->id, 0, "");
}
/* Sentry the unit. Don't request_unit_sentry since this can give a
* recursive loop. */
/* Sentry the unit. */
/* FIXME: Should not sentry if above loading fails (transport moved away,
* or filled already in server side) */
dsend_packet_unit_change_activity(&client.conn, pcargo->id,
ACTIVITY_SENTRY, EXTRA_NONE);
request_new_unit_activity_targeted(game_unit_by_number(pcargo->id),
ACTIVITY_SENTRY, NULL);
}
}
......
if (unit_owner(pcargo) == client.conn.playing
&& pcargo->activity == ACTIVITY_SENTRY) {
/* Activate the unit. */
dsend_packet_unit_change_activity(&client.conn, pcargo->id,
ACTIVITY_IDLE, EXTRA_NONE);
request_new_unit_activity_targeted(game_unit_by_number(pcargo->id),
ACTIVITY_IDLE, NULL);
}
}
}
    (1-1/1)