diff options
author | peter1138 <peter1138@openttd.org> | 2007-04-21 07:17:14 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2007-04-21 07:17:14 +0000 |
commit | cc001f112b1d26a536272e21a5990080f30b63b9 (patch) | |
tree | dcafaf8aab19ca909ac38da0e346afba3e7a1ccb | |
parent | cd97dec5a7a081d2caa5a11700175c11c8caa555 (diff) | |
download | openttd-cc001f112b1d26a536272e21a5990080f30b63b9.tar.xz |
(svn r9706) -Codechange: Support NewGRF town var 40 'largertowns' variable properly.
-rw-r--r-- | src/newgrf_town.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/newgrf_town.cpp b/src/newgrf_town.cpp index 497684e59..149427908 100644 --- a/src/newgrf_town.cpp +++ b/src/newgrf_town.cpp @@ -4,6 +4,7 @@ #include "stdafx.h" #include "openttd.h" +#include "variables.h" #include "debug.h" #include "functions.h" #include "town.h" @@ -18,7 +19,10 @@ uint32 TownGetVariable(byte variable, byte parameter, bool *available, const Tow { switch (variable) { /* Larger towns */ - case 0x40: return 1; + case 0x40: + if (_patches.larger_towns == 0) return 2; + if (t->index % _patches.larger_towns == 0) return 1; + return 0; /* Town index */ case 0x41: return t->index; |