-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix units not entering cities upon capture (#4839)
* Renamed and added doc comments for some some can-pass-through functions * Moved a city-state pass-through exception to a lower-level function Moved the exception that players (but not AI) can always pass through city-states from TileInfo.canCivPassThrough to CivilizationInfo.canPassThroughTiles (which is called by the former). This makes the behavior of the latter function accurate to its name, and makes the code more understandable overall. A side-effect of this change is that functions that used the lower-level CivilizationInfo.canPassThroughTiles function directly now consider the aforementioned exception. For example, if a city-state expands its border, it should now no longer push out units of a player civilization. It may make even more sense to move the exception to the "canMoveTo" logic, since AI should probably be able to pass through city-state tiles even when they don't want to end on them. That might however affect the AI more significantly. * Fixed bug where units would not enter a city upon capture As listed in #4697. * Fixed a bug where captured units were pushed out of captured cities Before, capturing a city with a civilian unit in it would cause the capturing military unit to enter the city but also cause the civilian unit to leave the city. Now, the civilian unit stays in the city as well.
- Loading branch information
Showing
8 changed files
with
47 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters