FreeCol / freecol

FreeCol: FreeCol is a turn-based strategy game based on the old game Colonization, and similar to Civilization. The objective of the game is to create an independent nation.
GNU General Public License v2.0
588 stars 173 forks source link

Unit will always return a FullLocationEntry #7

Closed schadr closed 4 years ago

schadr commented 6 years ago

Currently if the owner of a unit does not have a location set we can return null. This will break the path finding logic as that expects there to be always a none null tile.

Fixe bug 3115

HighwayofLife commented 6 years ago

Hi @schadr, there's a conflict in the merge, can you rebase and then submit again?

mpope042 commented 5 years ago

Currently if the owner of a unit does not have a location set we can return null. This will break the path finding logic as that expects there to be always a none null tile.

This is true, but the fix is insufficient and/or wrong. The "entry location" is the initial starting point at the edge of the high seas where a European nation's first unit appears. getFallbackTile also can return null, and when it does return non-null it will be a settlement tile, which is a very different thing. What needs to be done here is find out why getFullEntryLocation is failing, which "can not happen".

mpope042 commented 4 years ago

This is now too far out of date, and never addressed the real underlying problem. Closing.