Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2003:
[Freeciv-Dev] (PR#6219) bug in city_can_be_built_here usage
Home

[Freeciv-Dev] (PR#6219) bug in city_can_be_built_here usage

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#6219) bug in city_can_be_built_here usage
From: "Jason Short" <jshort@xxxxxxxxxxxxxx>
Date: Sat, 20 Sep 2003 18:39:24 -0700
Reply-to: rt@xxxxxxxxxxxxxx

In hut_get_city there is a call to city_can_be_built_here.  This passes in
the punit parameter.  But the punit is not the unit city_can_be_built_here
is expecting: the unit is not actually building the city, just finding it.
I don't think this can cause any problems in the current ruleset, but
under some future ruleset it might.

The unit passed in here should be NULL, and this case should be checked
for in city_can_be_built_here.

On a related note I think city_can_be_built_here should eventually check
punit->transported_by rather than comparing movement type to terrain type.

jason



[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#6219) bug in city_can_be_built_here usage, Jason Short <=