summaryrefslogtreecommitdiff
path: root/src/newgrf_config.cpp
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-08-23 22:25:50 +0000
committeryexo <yexo@openttd.org>2010-08-23 22:25:50 +0000
commitf6f218cf6b360fa8524f851d2e33aad275f1fe39 (patch)
tree5e736a48b08573c407c783e6121c4fb23432ec47 /src/newgrf_config.cpp
parentda4dc61f7619da291524c9f1dec6cff220adbdc8 (diff)
downloadopenttd-f6f218cf6b360fa8524f851d2e33aad275f1fe39.tar.xz
(svn r20604) -Feature: add a reset button to the newgrf parameters window
Diffstat (limited to 'src/newgrf_config.cpp')
-rw-r--r--src/newgrf_config.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/newgrf_config.cpp b/src/newgrf_config.cpp
index 01521cd54..2d2e6f856 100644
--- a/src/newgrf_config.cpp
+++ b/src/newgrf_config.cpp
@@ -101,6 +101,9 @@ const char *GRFConfig::GetDescription() const
/** Set the default value for all parameters as specified by action14. */
void GRFConfig::SetParameterDefaults()
{
+ this->num_params = 0;
+ MemSetT<uint32>(this->param, 0, lengthof(this->param));
+
if (!this->has_param_defaults) return;
for (uint i = 0; i < this->param_info.Length(); i++) {