summaryrefslogtreecommitdiff
path: root/src/saveload/company_sl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/saveload/company_sl.cpp')
-rw-r--r--src/saveload/company_sl.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/saveload/company_sl.cpp b/src/saveload/company_sl.cpp
index 588d0fb18..e9cd02d95 100644
--- a/src/saveload/company_sl.cpp
+++ b/src/saveload/company_sl.cpp
@@ -173,7 +173,14 @@ void AfterLoadCompanyStats()
case MP_WATER:
if (IsShipDepot(tile) || IsLock(tile)) {
c = Company::GetIfValid(GetTileOwner(tile));
- if (c != NULL) c->infrastructure.water += LOCK_DEPOT_TILE_FACTOR;
+ if (c != NULL) {
+ if (IsShipDepot(tile)) c->infrastructure.water += LOCK_DEPOT_TILE_FACTOR;
+ if (IsLock(tile) && GetLockPart(tile) == LOCK_PART_MIDDLE) {
+ /* The middle tile specifies the owner of the lock. */
+ c->infrastructure.water += 3 * LOCK_DEPOT_TILE_FACTOR; // the middle tile specifies the owner of the
+ break; // do not count the middle tile as canal
+ }
+ }
}
/* FALL THROUGH */