summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2008-02-27 21:33:52 +0000
committerpeter1138 <peter1138@openttd.org>2008-02-27 21:33:52 +0000
commit6aea2454c8eaf4119348a0b59deee5c644e5aa76 (patch)
treed76a11312be89e7099eb076300e2c4fc5cc637d3
parent926f5d548d1703a749a0fe8f0f5c0d1a5a125f9c (diff)
downloadopenttd-6aea2454c8eaf4119348a0b59deee5c644e5aa76.tar.xz
(svn r12295) -Codechange: Make plane speed option available to NewGRFs
-rw-r--r--src/newgrf.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index 434888a5d..ce3e06d5a 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -4091,8 +4091,18 @@ static uint32 GetPatchVariable(uint8 param)
/* empty wagon speed increase */
case 0x0F: return 0;
- /* plane speed factor */
- case 0x10: return 4;
+ /* plane speed factor; our patch option is reversed from TTDPatch's,
+ * the following is good for 1x, 2x and 4x (most common?) and...
+ * well not really for 3x. */
+ case 0x10:
+ switch (_patches.plane_speed) {
+ default:
+ case 4: return 1;
+ case 3: return 2;
+ case 2: return 2;
+ case 1: return 4;
+ }
+
/* 2CC colormap base sprite */
case 0x11: return SPR_2CCMAP_BASE;