summaryrefslogtreecommitdiff
path: root/src/newgrf_town.cpp
diff options
context:
space:
mode:
authorskidd13 <skidd13@openttd.org>2008-03-18 12:28:21 +0000
committerskidd13 <skidd13@openttd.org>2008-03-18 12:28:21 +0000
commita887b79f904ffea8138877feddf138400bf46eaa (patch)
tree3635265faa97c3ae592a1ad08aee603ada1d45f0 /src/newgrf_town.cpp
parent985dbaa093a9310bf176fb82a277ca858872aa3f (diff)
downloadopenttd-a887b79f904ffea8138877feddf138400bf46eaa.tar.xz
(svn r12381) -Fix [FS1835] [FS1535] (r11855): The number of houses wasn't computed right. A few other things regaring the updating had to be changed. Big thanks for support to frosch123 and SmatZ, to name just a few. (Inspired by a patch of bilbo)
Diffstat (limited to 'src/newgrf_town.cpp')
-rw-r--r--src/newgrf_town.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/newgrf_town.cpp b/src/newgrf_town.cpp
index 223be9803..d28fe9938 100644
--- a/src/newgrf_town.cpp
+++ b/src/newgrf_town.cpp
@@ -64,7 +64,7 @@ uint32 TownGetVariable(byte variable, byte parameter, bool *available, const Tow
case 0xAD: return GB(t->ratings[7], 8, 8);
case 0xAE: return t->have_ratings;
case 0xB2: return t->statues;
- case 0xB6: return t->num_houses;
+ case 0xB6: return ClampToU16(t->num_houses);
case 0xB9: return t->growth_rate;
case 0xBA: return ClampToU16(t->new_max_pass);
case 0xBB: return GB(ClampToU16(t->new_max_pass), 8, 8);