summaryrefslogtreecommitdiff
path: root/src/town_cmd.cpp
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2011-09-11 11:47:18 +0000
committeryexo <yexo@openttd.org>2011-09-11 11:47:18 +0000
commit40d5419cd209cd84e2ff28a0585bc4ec44688981 (patch)
tree8e6481ace71e161a28ac8148fff330b00f9aa6f4 /src/town_cmd.cpp
parent07077dc56ea335a8521bfb1953b5a883bd1d507d (diff)
downloadopenttd-40d5419cd209cd84e2ff28a0585bc4ec44688981.tar.xz
(svn r22920) -Cleanup: replace two very old town variables taht were rarely used by small functions that compute there value on-the-fly when necessary
Diffstat (limited to 'src/town_cmd.cpp')
-rw-r--r--src/town_cmd.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp
index 0c080246c..c76ca9fff 100644
--- a/src/town_cmd.cpp
+++ b/src/town_cmd.cpp
@@ -1431,8 +1431,6 @@ static void DoCreateTown(Town *t, TileIndex tile, uint32 townnameparts, TownSize
t->act_pass = 0;
t->act_mail = 0;
- t->pct_pass_transported = 0;
- t->pct_mail_transported = 0;
t->fund_buildings_months = 0;
t->new_act_food = 0;
t->new_act_water = 0;
@@ -2804,16 +2802,11 @@ static void UpdateTownGrowRate(Town *t)
static void UpdateTownAmounts(Town *t)
{
- /* Using +1 here to prevent overflow and division by zero */
- t->pct_pass_transported = t->new_act_pass * 256 / (t->new_max_pass + 1);
-
t->max_pass = t->new_max_pass; t->new_max_pass = 0;
t->act_pass = t->new_act_pass; t->new_act_pass = 0;
t->act_food = t->new_act_food; t->new_act_food = 0;
t->act_water = t->new_act_water; t->new_act_water = 0;
- /* Using +1 here to prevent overflow and division by zero */
- t->pct_mail_transported = t->new_act_mail * 256 / (t->new_max_mail + 1);
t->max_mail = t->new_max_mail; t->new_max_mail = 0;
t->act_mail = t->new_act_mail; t->new_act_mail = 0;