summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2005-02-01 18:46:49 +0000
committertruelight <truelight@openttd.org>2005-02-01 18:46:49 +0000
commitbb05305a1f327fb74f3bf8572db9ae8b63e2c063 (patch)
tree0a111e931f85feb1c4051707f39dcb52ea599d46
parent59ac6e8c4b2e564a864260d6715d2128a291b1d0 (diff)
downloadopenttd-bb05305a1f327fb74f3bf8572db9ae8b63e2c063.tar.xz
(svn r1765) -Fix: on loading, the total amount of towns wasn't reset to zero
-rw-r--r--town_cmd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/town_cmd.c b/town_cmd.c
index eeb1aff49..af6f66396 100644
--- a/town_cmd.c
+++ b/town_cmd.c
@@ -31,7 +31,7 @@ static void TownPoolNewBlock(uint start_item)
Town *t;
FOR_ALL_TOWNS_FROM(t, start_item)
- t->index = start_item++;
+ t->index = start_item++;
}
/* Initialize the town-pool */
@@ -1971,6 +1971,8 @@ static void Load_TOWN(void)
{
int index;
+ _total_towns = 0;
+
while ((index = SlIterateArray()) != -1) {
Town *t;