[Freeciv-Dev] (PR#1524) Bug: Carrier disband and airplanes
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=1524 >
> [ChrisK@xxxxxxxx - Sat Jun 01 10:33:02 2002]:
> Maybe they should awake, when their carrier is disbanded, though?
This patch activates all units that are unloaded when a unit is wiped
(disbanded or...whatever).
Note this means ground units that are reshuffled to a different
transporter are activated.
Note also I think I found a bug here. Units may be unloaded or shuffled
but there's no send_unit_info call so their info isn't sent to the
client (except by accident when it happens later). This could be a
significant bug.
If someone will provide a savagame (a carrier with a few planes on it) I
will test further.
-jason
Index: server/unittools.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/unittools.c,v
retrieving revision 1.329
diff -u -r1.329 unittools.c
--- server/unittools.c 22 Mar 2005 23:29:22 -0000 1.329
+++ server/unittools.c 23 Mar 2005 06:25:40 -0000
@@ -1608,9 +1608,18 @@
/* First pull all units off of the transporter. */
if (get_transporter_capacity(punit) > 0) {
+ /* FIXME: there's no send_unit_info call below so these units aren't
+ * updated at the client. I guess this works because the unit info
+ * will be sent eventually anyway, but it's surely a bug. */
unit_list_iterate(ptile->units, pcargo) {
if (pcargo->transported_by == punit->id) {
pull_unit_from_transporter(pcargo, punit);
+ if (pcargo->activity == ACTIVITY_SENTRY) {
+ /* Activate sentried units - like planes on a disbanded carrier.
+ * Note this will activate ground units even if they just change
+ * transporter. */
+ set_unit_activity(pcargo, ACTIVITY_IDLE);
+ }
}
} unit_list_iterate_end;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#1524) Bug: Carrier disband and airplanes,
Jason Short <=
|
|