changeset 16611:990c4ce9c356 draft

(svn r21341) -Add: Use the complete industry name instead of only the town when sorting industries by name.
author terkhen <terkhen@openttd.org>
date Sat, 27 Nov 2010 22:42:24 +0000
parents dd09f83ba73b
children 4fb9ba6f7037
files src/industry_gui.cpp
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/industry_gui.cpp
+++ b/src/industry_gui.cpp
@@ -1128,13 +1128,13 @@
 		static char buf_cache[96];
 		static char buf[96];
 
-		SetDParam(0, (*a)->town->index);
-		GetString(buf, STR_TOWN_NAME, lastof(buf));
+		SetDParam(0, (*a)->index);
+		GetString(buf, STR_INDUSTRY_NAME, lastof(buf));
 
 		if (*b != last_industry) {
 			last_industry = *b;
-			SetDParam(0, (*b)->town->index);
-			GetString(buf_cache, STR_TOWN_NAME, lastof(buf_cache));
+			SetDParam(0, (*b)->index);
+			GetString(buf_cache, STR_INDUSTRY_NAME, lastof(buf_cache));
 		}
 
 		return strcmp(buf, buf_cache);