summaryrefslogtreecommitdiff
path: root/src/script/api
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2021-11-01 23:07:27 +0100
committerMichael Lutz <michi@icosahedron.de>2021-12-16 22:28:32 +0100
commitccefa76a4686581b8d1a9bd13d7d754807a9f8d1 (patch)
treeb367f92a76d9e6e1690c86e5140c16b223a7d350 /src/script/api
parent6691ee3b963ee3282490360bb3cc1ea09d0c58ea (diff)
downloadopenttd-ccefa76a4686581b8d1a9bd13d7d754807a9f8d1.tar.xz
Codechange: Template DoCommandPInternal.
Diffstat (limited to 'src/script/api')
-rw-r--r--src/script/api/script_object.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/api/script_object.hpp b/src/script/api/script_object.hpp
index cfb6d393a..26da500c4 100644
--- a/src/script/api/script_object.hpp
+++ b/src/script/api/script_object.hpp
@@ -371,7 +371,7 @@ bool ScriptObject::ScriptDoCommandHelper<Tcmd, CommandCost(*)(DoCommandFlag, Tar
if (!estimate_only && networking) ScriptObject::SetLastCommand(tile, EndianBufferWriter<CommandDataBuffer>::FromValue(args), Tcmd);
/* Try to perform the command. */
- CommandCost res = std::apply(&DoCommandPInternal, std::tuple_cat(std::make_tuple(Tcmd, (StringID)0, networking ? ScriptObject::GetDoCommandCallback() : nullptr, false, estimate_only, false), args));
+ CommandCost res = ::Command<Tcmd>::Unsafe((StringID)0, networking ? ScriptObject::GetDoCommandCallback() : nullptr, false, estimate_only, tile, args);
return ScriptObject::DoCommandProcessResult(res, callback, estimate_only);
}