[Freeciv-Dev] (PR#8672) punit->occupy has no value at the server
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=8672 >
I might have tracked down that infinite loop to something in
ai_manage_ferryboat() in aiunit.c, I find if I log everything I get the
same message over and over:
0: Boadicea's Galleon[453] (56,14)->(55,15){0,0} passing control to
Legion[455]
These units can be readily seen in the save file I submitted earlier.
I think what's happening is that the ferryboat (453) senses that its
boss (455) is off the ship, and gives it control, only it has no moves
left. The code continues and gets to the end of the do while loop,
where it checks the number of passengers on the ship. There is still
one (457), so it loops back. However nothing will change because the
off-boat unit is still the boss, and it can't do anything.
Is this a bug in the AI that wasn't noticed because punit->occupy has an
invalid value?
However, I can't reproduce this infinite loop in plain CVS, even if I
change the check at the end of the do while loop for punit->occupy to
get_transporter_occupancy(punit), which should return the correct value.
Any clues?
-James Canete
|
|