mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 06:15:04 +00:00
(svn r18950) -Fix: make sure the values of settings loaded from a savegame are valid
This commit is contained in:
parent
f8b0ddd3ec
commit
f381b91de0
@ -584,7 +584,7 @@
|
|||||||
GetBankBalance(): 100000
|
GetBankBalance(): 100000
|
||||||
GetName(): (null : 0x00000000)
|
GetName(): (null : 0x00000000)
|
||||||
GetLoanAmount(): 100000
|
GetLoanAmount(): 100000
|
||||||
GetMaxLoanAmount(): 2000000000
|
GetMaxLoanAmount(): 500000
|
||||||
GetLoanInterval(): 10000
|
GetLoanInterval(): 10000
|
||||||
SetLoanAmount(1): false
|
SetLoanAmount(1): false
|
||||||
SetLoanAmount(100): false
|
SetLoanAmount(100): false
|
||||||
@ -596,8 +596,8 @@
|
|||||||
GetBankBalance(): 40000
|
GetBankBalance(): 40000
|
||||||
GetLoanAmount(): 40000
|
GetLoanAmount(): 40000
|
||||||
SetLoanAmount(10000): true
|
SetLoanAmount(10000): true
|
||||||
GetBankBalance(): 2000000000
|
GetBankBalance(): 500000
|
||||||
GetLoanAmount(): 2000000000
|
GetLoanAmount(): 500000
|
||||||
GetCompanyHQ(): -1
|
GetCompanyHQ(): -1
|
||||||
BuildCompanyHQ(): true
|
BuildCompanyHQ(): true
|
||||||
GetCompanyHQ(): 33151
|
GetCompanyHQ(): 33151
|
||||||
@ -681,7 +681,7 @@
|
|||||||
GetAirportWidth(9): -1
|
GetAirportWidth(9): -1
|
||||||
GetAirportHeight(9): -1
|
GetAirportHeight(9): -1
|
||||||
GetAirportCoverageRadius(9): -1
|
GetAirportCoverageRadius(9): -1
|
||||||
GetBankBalance(): 1999999790
|
GetBankBalance(): 499790
|
||||||
GetPrice(): 5400
|
GetPrice(): 5400
|
||||||
BuildAirport(): true
|
BuildAirport(): true
|
||||||
IsHangarTile(): false
|
IsHangarTile(): false
|
||||||
@ -691,11 +691,11 @@
|
|||||||
IsHangarTile(): true
|
IsHangarTile(): true
|
||||||
IsAirportTile(): true
|
IsAirportTile(): true
|
||||||
GetAirportType(): 0
|
GetAirportType(): 0
|
||||||
GetBankBalance(): 1999989890
|
GetBankBalance(): 489890
|
||||||
RemoveAirport(): true
|
RemoveAirport(): true
|
||||||
IsHangarTile(): false
|
IsHangarTile(): false
|
||||||
IsAirportTile(): false
|
IsAirportTile(): false
|
||||||
GetBankBalance(): 1999989626
|
GetBankBalance(): 489626
|
||||||
BuildAirport(): true
|
BuildAirport(): true
|
||||||
|
|
||||||
--Bridge--
|
--Bridge--
|
||||||
@ -7085,7 +7085,7 @@
|
|||||||
IsBuoyTile(): false
|
IsBuoyTile(): false
|
||||||
IsLockTile(): false
|
IsLockTile(): false
|
||||||
IsCanalTile(): false
|
IsCanalTile(): false
|
||||||
GetBankBalance(): 1999980703
|
GetBankBalance(): 480703
|
||||||
BuildWaterDepot(): true
|
BuildWaterDepot(): true
|
||||||
BuildDock(): true
|
BuildDock(): true
|
||||||
BuildBuoy(): true
|
BuildBuoy(): true
|
||||||
@ -7098,7 +7098,7 @@
|
|||||||
IsBuoyTile(): true
|
IsBuoyTile(): true
|
||||||
IsLockTile(): true
|
IsLockTile(): true
|
||||||
IsCanalTile(): true
|
IsCanalTile(): true
|
||||||
GetBankBalance(): 1999951154
|
GetBankBalance(): 451154
|
||||||
|
|
||||||
--AIWaypointList(BUOY)--
|
--AIWaypointList(BUOY)--
|
||||||
Count(): 1
|
Count(): 1
|
||||||
@ -7117,7 +7117,7 @@
|
|||||||
IsBuoyTile(): false
|
IsBuoyTile(): false
|
||||||
IsLockTile(): false
|
IsLockTile(): false
|
||||||
IsCanalTile(): false
|
IsCanalTile(): false
|
||||||
GetBankBalance(): 1999928509
|
GetBankBalance(): 428509
|
||||||
BuildWaterDepot(): true
|
BuildWaterDepot(): true
|
||||||
BuildDock(): true
|
BuildDock(): true
|
||||||
|
|
||||||
|
@ -1784,6 +1784,7 @@ static void LoadSettings(const SettingDesc *osd, void *object)
|
|||||||
void *ptr = GetVariableAddress(object, sld);
|
void *ptr = GetVariableAddress(object, sld);
|
||||||
|
|
||||||
if (!SlObjectMember(ptr, sld)) continue;
|
if (!SlObjectMember(ptr, sld)) continue;
|
||||||
|
Write_ValidateSetting(ptr, osd, ReadValue(ptr, sld->conv));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user