src/newgrf_town.cpp
branchcpp_gui
changeset 6308 646711c5feaa
parent 6303 84c215fc8eb8
child 7018 cf6ba638333e
--- a/src/newgrf_town.cpp	Sun Apr 15 17:04:44 2007 +0000
+++ b/src/newgrf_town.cpp	Sat Apr 21 08:23:57 2007 +0000
@@ -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 @@
 {
 	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;