summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2007-08-04 23:35:27 +0000
committerglx <glx@openttd.org>2007-08-04 23:35:27 +0000
commit8cea2059a5c32ce8ff284f37536ea3a9cbb30e53 (patch)
tree624bed377c4ff8e87c911f4ecc93f4900e8904cd /src
parentce9cba5edbd5b6e14553eddd4b004af8e3602c08 (diff)
downloadopenttd-8cea2059a5c32ce8ff284f37536ea3a9cbb30e53.tar.xz
(svn r10787) -Fix r10755: _total_towns was not increased when placing town manually in scenario editor
Diffstat (limited to 'src')
-rw-r--r--src/town_cmd.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp
index 7c731b39e..4fa9a8c85 100644
--- a/src/town_cmd.cpp
+++ b/src/town_cmd.cpp
@@ -47,6 +47,7 @@ DEFINE_OLD_POOL_GENERIC(Town, Town)
Town::Town(TileIndex tile)
{
+ if (tile != 0) _total_towns++;
this->xy = tile;
}
@@ -1354,8 +1355,6 @@ static void DoCreateTown(Town *t, TileIndex tile, uint32 townnameparts, TownSize
extern int _nb_orig_names;
int x, i;
- _total_towns++;
-
t->xy = tile;
t->num_houses = 0;
t->time_until_rebuild = 10;