Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2005:
[Freeciv-Dev] (PR#12610) AI tries to move units with zero movement
Home

[Freeciv-Dev] (PR#12610) AI tries to move units with zero movement

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#12610) AI tries to move units with zero movement
From: "Marko Lindqvist" <marko.lindqvist@xxxxxxxxxxx>
Date: Wed, 23 Mar 2005 14:47:37 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12610 >


  I don't know if this is a bug or not, but I noticed that AI player 
receives some "This unit has no moves left" messages.


Breakpoint 1, handle_unit_move_request (punit=0x1071e0a0, 
pdesttile=0x1025559c, igzoc=false, move_diplomat_city=false) at 
../../freeciv-patch/server/unithand.c:990
990         notify_player_ex(pplayer, punit->tile, E_NOEVENT,
(gdb) bt full
#0  handle_unit_move_request (punit=0x1071e0a0, pdesttile=0x1025559c, 
igzoc=false,
     move_diplomat_city=false) at ../../freeciv-patch/server/unithand.c:990
         igzoc = false
         move_diplomat_city = false
         pplayer = (struct player *) 0x5b7368
         pcity = (struct city *) 0x0
#1  0x004e7b07 in ai_unit_attack (punit=0x1071e0a0, ptile=0x1025559c)
     at ../../freeciv-patch/ai/aitools.c:520
         sanity = 195
         alive = false
#2  0x004e418a in ai_hunter_manage (pplayer=0x5b7368, punit=0x1071e0a0)
     at ../../freeciv-patch/ai/aihunt.c:489
         target = (struct unit *) 0x102385c0
         sanity_own = 195
         sanity_target = 177
#3  0x004ed476 in ai_manage_military (pplayer=0x5b7368, punit=0x1071e0a0)
     at ../../freeciv-patch/ai/aiunit.c:1962
         id = 195
#4  0x004eda10 in ai_manage_unit (pplayer=0x5b7368, punit=0x1071e0a0)
     at ../../freeciv-patch/ai/aiunit.c:2090
         bodyguard = (struct unit *) 0x0
#5  0x004ede0b in ai_manage_units (pplayer=0x5b7368) at 
../../freeciv-patch/ai/aiunit.c:2185
         punit = (struct unit *) 0x1071e0a0
         _ids = (int (*)[0]) 0x22edec
         _i = 0
         myiter = (struct genlist_link *) 0x0
         punit = (struct unit *) 0x2
         _size = 2
#6  0x004e2801 in ai_do_first_activities (pplayer=0x5b7368)
     at ../../freeciv-patch/ai/aihand.c:420
No locals.
#7  0x004659e3 in ai_start_phase () at 
../../freeciv-patch/server/srv_main.c:453
         pplayer = (struct player *) 0x5b7368
         i = 8
#8  0x00465e1f in begin_phase (is_new_phase=true) at 
../../freeciv-patch/server/srv_main.c:567
         is_new_phase = true
         pplayer = (struct player *) 0xb
         i = 11
         pplayer = (struct player *) 0xb
         i = 5998696
         pplayer = (struct player *) 0x5b8868
         i = 11
         pplayer = (struct player *) 0x5b8868
         i = 11
         pplayer = (struct player *) 0x5b8868
         i = 11
         pplayer = (struct player *) 0x5b8868
         i = 11
#9  0x00467ce0 in main_loop () at ../../freeciv-patch/server/srv_main.c:1569
         eot_timer = (struct timer *) 0x102c2f98
         save_counter = 50
         is_new_turn = true
#10 0x00468703 in srv_loop () at ../../freeciv-patch/server/srv_main.c:1939
         i = 85
         start_nations = false
#11 0x00467f5c in srv_main () at ../../freeciv-patch/server/srv_main.c:1692
(gdb) p *punit
$2 = {type = 15, id = 195, owner = 6, tile = 0x10254128, homecity = 122, 
moves_left = 0,
   hp = 10, veteran = 1, unhappiness = 0, upkeep = {0, 0, 0, 0, 0, 0}, 
fuel = 0,
   bribe_cost = -1, ai = {control = false, ai_role = AIUNIT_HUNTER, 
ferryboat = 0,
     passenger = 0, bodyguard = 0, charge = 0, prev_struct = 0x1025416c,
     cur_struct = 0x1025416c, prev_pos = 0x1071e0fc, cur_pos = 
0x1071e100, target = 177,
     hunted = 8, done = false}, activity = ACTIVITY_IDLE, goto_tile = 
0x0, activity_count = 0,
   activity_target = S_NO_SPECIAL, focus_status = FOCUS_AVAIL, ord_map = 
0, ord_city = 0,
   foul = false, debug = false, moved = true, paradropped = false, 
done_moving = true,
   transported_by = -1, occupy = 0, client = {colored = false, 
color_index = 0},
   has_orders = false, orders = {length = 0, index = 0, repeat = false, 
vigilant = false,
     list = 0x0}}


  - ML





[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#12610) AI tries to move units with zero movement, Marko Lindqvist <=