Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2004:
[Freeciv-Dev] (PR#8672) punit->occupy has no value at the server
Home

[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]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#8672) punit->occupy has no value at the server
From: "James Canete" <use_less@xxxxxxxxxxx>
Date: Sat, 19 Jun 2004 04:37:21 -0700
Reply-to: rt@xxxxxxxxxxx

<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


[Prev in Thread] Current Thread [Next in Thread]