summaryrefslogtreecommitdiff
path: root/src/newgrf.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2009-05-04 11:23:21 +0000
committerfrosch <frosch@openttd.org>2009-05-04 11:23:21 +0000
commitddd47a056d9abc2760181dd4083b605164e6b4cb (patch)
treea4a63d343de314a5f2713768525ebf4e509d5c34 /src/newgrf.cpp
parent21f5f602f9487c248d545487f40a539a35e698e9 (diff)
downloadopenttd-ddd47a056d9abc2760181dd4083b605164e6b4cb.tar.xz
(svn r16223) -Fix (r8881): ActionB should use the online parameters from GRFFile instead of the initial user-specified values from GRFConfig. Also use the values as they were set when the ActionB was executed, not as they are set when the message is shown.
Diffstat (limited to 'src/newgrf.cpp')
-rw-r--r--src/newgrf.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index 6ed173463..508e8305c 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -4381,7 +4381,8 @@ static void GRFLoadError(byte *buf, size_t len)
/* Only two parameter numbers can be used in the string. */
uint i = 0;
for (; i < 2 && len > 0; i++) {
- error->param_number[i] = grf_load_byte(&buf);
+ uint param_number = grf_load_byte(&buf);
+ error->param_value[i] = (param_number < _cur_grffile->param_end ? _cur_grffile->param[param_number] : 0);
len--;
}
error->num_params = i;