Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2004:
[Freeciv-Dev] Re: (PR#9124) major ferry bug
Home

[Freeciv-Dev] Re: (PR#9124) major ferry bug

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#9124) major ferry bug
From: "Per Inge Mathisen" <per@xxxxxxxxxxx>
Date: Wed, 7 Jul 2004 04:59:40 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=9124 >

Some painful debugging later, it turns out that the problem was caused by
a change that was not very well described in a patch that changed
city_can_be_built_here() by Jason.

http://www.freeciv.org/cvsweb.cgi/freeciv/common/city.c.diff?r1=1.220;r2=1.221

"
Fri Jun 25 23:29:59 2004 UTC (11 days, 12 hours ago) by jdorje
Branches: MAIN
Changes since revision 1.220: +7 -8 lines

Add a new terrain flag NoCities.  Terrains with this flag cannot have
cities built on them, nor can tiles with cities on them be transformed
into this type of terrain.  Currently only ocean gets the NoCities flag.

Patch by me in PR#8797.
"

The offending lines being:
+  if (punit && punit->transported_by != -1) {
+    /* Transported units cannot build cities. */
+    return FALSE;
+  }

This makes sure that settlers never get off their boats. It is mistake,
since the function is supposed to say whether the unit can make a city at
its destination, not where it is currently. I'm nuking these lines to make
cvs AI able to spread by boat again.

  - Per




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