[Freeciv-Dev] Re: (PR#2707) Goto get stuck after attacking
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Thu, 2 Jan 2003, Guest via RT wrote:
> I did a Goto to attack a unit and then when the enemy unit got killed
> my unit still has a "g" on it, and it becomes active i.e. blinking, and
> I can move it around (while still having the "g" on it self).
>
> Then I the attack a city with this unit, using manual movement, I
> get "Howitzer aborted GOTO as there are units in the way", and the g
> does not get removed. Ironically when I use GOTO I can attack fine
Here is a fix for this bug. It should fix the problem without causing
problems elsewhere in the code, and it can be fixed in S1_14 without doing
another beta to test it, IMHO.
- Per
Index: server/unithand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/unithand.c,v
retrieving revision 1.234.2.3
diff -u -r1.234.2.3 unithand.c
--- server/unithand.c 14 Nov 2002 22:17:22 -0000 1.234.2.3
+++ server/unithand.c 17 Jan 2003 08:51:22 -0000
@@ -807,6 +807,10 @@
}
}
+ if (pwinner == punit && punit->activity != ACTIVITY_IDLE) {
+ /* Ensure we remove ACTIVITY_GOTO here */
+ set_unit_activity(punit, ACTIVITY_IDLE);
+ }
send_unit_info(NULL, pwinner);
}
|
|