diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 92455e8dcb..3e8a44ad49 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -1,6 +1,7 @@ 0.4.7 (in development) ------------------------------------------------------------------------ - Fix: [#20737] Spent money in player window underflows when getting refunds. +- Fix: [#20778] [Plugin] Incorrect target api when executing custom actions. 0.4.6 (2023-09-03) ------------------------------------------------------------------------ diff --git a/src/openrct2/scripting/ScriptEngine.cpp b/src/openrct2/scripting/ScriptEngine.cpp index c064ca486d..c2626a4ae7 100644 --- a/src/openrct2/scripting/ScriptEngine.cpp +++ b/src/openrct2/scripting/ScriptEngine.cpp @@ -1069,7 +1069,7 @@ GameActions::Result ScriptEngine::QueryOrExecuteCustomGameAction(const CustomAct } std::vector pluginCallArgs; - if (GetTargetAPIVersion() <= API_VERSION_68_CUSTOM_ACTION_ARGS) + if (customActionInfo.Owner->GetTargetAPIVersion() <= API_VERSION_68_CUSTOM_ACTION_ARGS) { pluginCallArgs = { *dukArgs }; }