[Freeciv-Dev] (PR#4565) PR#1060 Disbanded units
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Hi,
when searching for "unit" in the rt system i found that old new feature
report.
First i was changing the comment because it is wrong ... AI is using the
packet and not do_unit_disband_safe .
I wasn't able to test it because some compiling problems ...
Thomas
--
Thomas Strub *** eMail ue80@xxxxxxxxxxxxxxxxxxxxx
jb: people are stupid, they don't want to learn.
Index: server/cityturn.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/cityturn.c,v
retrieving revision 1.215
diff -u -r1.215 cityturn.c
--- server/cityturn.c 2003/07/02 19:32:47 1.215
+++ server/cityturn.c 2003/07/14 16:58:47
@@ -42,6 +42,7 @@
#include "spacerace.h"
#include "srv_main.h"
#include "unittools.h"
+#include "unithand.h"
#include "advdomestic.h"
#include "aicity.h"
@@ -901,7 +902,10 @@
notify_player_ex(pplayer, pcity->x, pcity->y, E_UNIT_LOST,
_("Game: %s can't upkeep %s, unit disbanded."),
pcity->name, unit_type(punit)->name);
- wipe_unit_safe(punit, &myiter);
+ /* same mechanism as the AI is disbanding units */
+ struct packet_unit_request packet;
+ packet.unit_id = punit->id;
+ handle_unit_disband(pplayer, &packet);
break;
}
}
Index: server/unithand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/unithand.c,v
retrieving revision 1.261
diff -u -r1.261 unithand.c
--- server/unithand.c 2003/06/19 17:30:34 1.261
+++ server/unithand.c 2003/07/14 16:58:48
@@ -398,8 +398,6 @@
Disband a unit. If its in a city, add 1/2 of the worth of the unit
to the city's shield stock for the current production.
"iter" may be NULL, see wipe_unit_safe for details.
- NOTE: AI calls do_unit_disband_safe directly, but player calls
- of course handle_unit_disband_safe
**************************************************************************/
static void do_unit_disband_safe(struct city *pcity, struct unit *punit,
struct genlist_iterator *iter)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#4565) PR#1060 Disbanded units,
ue80@xxxxxxxxxxxxxxxxxxxxx <=
|
|