summaryrefslogtreecommitdiff
path: root/strings.c
diff options
context:
space:
mode:
authordarkvater <darkvater@openttd.org>2004-12-15 00:31:08 +0000
committerdarkvater <darkvater@openttd.org>2004-12-15 00:31:08 +0000
commitc58549d512495568afcc2a6a8ecef8325c4aac33 (patch)
treeabede9dde98130661ade81d3386600bcf406e07b /strings.c
parent6cb53e7d34b75ba4c2938dbb623ba100c74c0798 (diff)
downloadopenttd-c58549d512495568afcc2a6a8ecef8325c4aac33.tar.xz
(svn r1093) -Fix: Hopefully fixed windows revision issues once and for all. Removed globalness of _openttd_revision and put all such ifdefs into one place. If server has a revision only the same revisions can join; if the server has no revision everyone can join. I reckon this should be a server-side option to allow people to join or not to join.
Diffstat (limited to 'strings.c')
-rw-r--r--strings.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/strings.c b/strings.c
index 14ed34ff0..24a9391a1 100644
--- a/strings.c
+++ b/strings.c
@@ -20,6 +20,14 @@ static byte *_langpack;
static uint _langtab_num[32]; // Offset into langpack offs
static uint _langtab_start[32]; // Offset into langpack offs
+#if defined(WITH_REV)
+ extern const char _openttd_revision[];
+#elif defined(WITH_REV_HACK)
+ const char _openttd_revision[] = WITH_REV_HACK;
+#else
+ const char _openttd_revision[] = NOREV_STRING;
+#endif
+
typedef byte *PlayerNameGeneratorProc(byte *buffr);
typedef struct {
@@ -433,9 +441,7 @@ static byte *DecodeString(byte *buff, const byte *str)
buff = FormatNoCommaNumber(buff, GetParamInt32());
break;
case 2: /* {REV} */
-#ifdef WITH_REV
buff = str_cat(buff, (const byte*)_openttd_revision);
-#endif
break;
case 3: { /* {SHORTCARGO} */
// Short description of cargotypes. Layout: