Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2005:
[Freeciv-Dev] (PR#12725) Attacking Ferries and ai_fill_unit_param
Home

[Freeciv-Dev] (PR#12725) Attacking Ferries and ai_fill_unit_param

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#12725) Attacking Ferries and ai_fill_unit_param
From: "Benedict Adamson" <badamson@xxxxxxxxxxx>
Date: Tue, 5 Apr 2005 15:53:30 -0700
Reply-to: bugs@xxxxxxxxxxx

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

The combination of the new PF AI goto code, which Per has just 
committed, and my update of the ancients rule-set crashes in PF with the 
attached autogame.

The crash is because of the following assertion fails:
path_finding.c:799: create_danger_segment: Assertion 
`!pf_map->d_lattice[ptile->index].is_dangerous'

Looking at the stack back trace, I see that the AI has passed a ferry to 
the attack code (ai_manage_military called from ai_manage_ferryboat at 
line aiferry.c:941). However, the set up of the PF parameters by the new 
ai_fill_unit_param function mishandles such cases when punit->ai.ai_role 
== AIUNIT_ATTACK (it is OK when the ai_role is AIUNIT_HUNTER): it sets 
get_TB to no_fights, which is not much use for an attacker! I don't know 
if that is the cause of the crash, but it's certainly a bug.

rulesetdir ancients
set gameseed 23
set mapseed 17

set size 1
set generator 2
set startpos 1
set aifill 3
set specials 1000
set startunits cccccxxxx
set dispersion 4
set researchcost 4
set foodbox 5
set huts 0
set barbarians 4
set endyear 1400
normal

create Caesar
create Hengest
create Hannibal

set timeout -1
start

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#12725) Attacking Ferries and ai_fill_unit_param, Benedict Adamson <=