summaryrefslogtreecommitdiff
path: root/src/misc.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2009-09-06 18:53:57 +0000
committerfrosch <frosch@openttd.org>2009-09-06 18:53:57 +0000
commit438a429549486f08919748cee0f5346ccacf760b (patch)
tree3858342b95e237dcb97d35476646e0d0f9d23aeb /src/misc.cpp
parent2ce1a608a8ff5eb4cd6582adac990b2004ce1103 (diff)
downloadopenttd-438a429549486f08919748cee0f5346ccacf760b.tar.xz
(svn r17433) -Codechange: Store cumulated inflation in savegame and compute all prices from that instead of storing all prices separately.
Note: Savegame conversion computes the inflation from max loan. Prices from modified savegames will get lost. TTO savegames will also behave slightly different. -Change: NewGRF price modifiers now take effect everytime when loading NewGRFs instead of once on gamestart.
Diffstat (limited to 'src/misc.cpp')
-rw-r--r--src/misc.cpp17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/misc.cpp b/src/misc.cpp
index d84243d13..d5847eacc 100644
--- a/src/misc.cpp
+++ b/src/misc.cpp
@@ -121,7 +121,7 @@ void InitializeGame(uint size_x, uint size_y, bool reset_date, bool reset_settin
#endif /* ENABLE_NETWORK */
InitializeAnimatedTiles();
- InitializeLandscapeVariables(false);
+ InitializeEconomy();
ResetObjectToPlace();
@@ -132,18 +132,3 @@ void InitializeGame(uint size_x, uint size_y, bool reset_date, bool reset_settin
GamelogGRFAddList(_grfconfig);
GamelogStopAction();
}
-
-
-/* Calculate constants that depend on the landscape type. */
-void InitializeLandscapeVariables(bool only_constants)
-{
- if (only_constants) return;
-
- memset(_cargo_payment_rates, 0, sizeof(_cargo_payment_rates));
- memset(_cargo_payment_rates_frac, 0, sizeof(_cargo_payment_rates_frac));
-
- const CargoSpec *cs;
- FOR_ALL_CARGOSPECS(cs) {
- _cargo_payment_rates[cs->Index()] = cs->initial_payment;
- }
-}