<URL: http://bugs.freeciv.org/Ticket/Display.html?id=35575 >
This fixes problems in the built-in map editor with placing units,
where units would lose fuel, movement and/or hitpoints. It is mostly
just a band-aid to ease further testing, though.
- Per
Index: client/gui-gtk-2.0/editdlg.c
===================================================================
--- client/gui-gtk-2.0/editdlg.c (revision 12601)
+++ client/gui-gtk-2.0/editdlg.c (working copy)
@@ -42,7 +42,6 @@
#define TOOL_WIDTH 5
enum unit_param {
- UPARAM_MOVES,
UPARAM_ACTIVITY,
UPARAM_ACTIVITY_TARGET,
UPARAM_ACTIVITY_COUNT,
@@ -189,9 +188,6 @@
enum unit_param param = GPOINTER_TO_INT(data);
switch (param) {
- case UPARAM_MOVES:
- punit->moves_left = gtk_spin_button_get_value_as_int(spinbutton);
- return;
case UPARAM_ACTIVITY:
punit->activity = gtk_spin_button_get_value_as_int(spinbutton);
return;
@@ -327,12 +323,10 @@
int i;
struct unit *punit = editor_get_selected_unit();
- const char *names[UPARAM_LAST] = { _("Moves Left"),
- _("Activity"),
+ const char *names[UPARAM_LAST] = { _("Activity"),
_("Activity Target"),
_("Activity Count") };
int inits[UPARAM_LAST][3] = {
- {punit->moves_left, 0, 200},
{punit->activity, 0, ACTIVITY_LAST},
{punit->activity_target, 0, S_LAST},
{punit->activity_count, 0, 200}
Index: client/editor.c
===================================================================
--- client/editor.c (revision 12601)
+++ client/editor.c (working copy)
@@ -142,9 +142,9 @@
packet.type = selected_unit->type->index;
packet.transported_by = selected_unit->transported_by;
- packet.movesleft = selected_unit->moves_left;
- packet.hp = selected_unit->hp;
- packet.fuel = selected_unit->fuel;
+ packet.movesleft = unit_type(selected_unit)->move_rate;
+ packet.hp = unit_type(selected_unit)->hp;
+ packet.fuel = unit_type(selected_unit)->fuel;
packet.activity_count = selected_unit->activity_count;
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev