diff --git a/src/script/api/script_object.cpp b/src/script/api/script_object.cpp index 14ef59d8a0..adeec4afc7 100644 --- a/src/script/api/script_object.cpp +++ b/src/script/api/script_object.cpp @@ -18,6 +18,8 @@ #include "../../genworld.h" #include "../../string_func.h" #include "../../strings_func.h" +#include "../../scope_info.h" +#include "../../map_func.h" #include "../script_storage.hpp" #include "../script_instance.hpp" @@ -306,6 +308,9 @@ ScriptObject::ActiveInstance::~ActiveInstance() if (GetCommandFlags(cmd) & CMD_CLIENT_ID && p2 == 0) p2 = UINT32_MAX; #endif + SCOPE_INFO_FMT([=], "ScriptObject::DoCommand: tile: %X (%d x %d), p1: 0x%X, p2: 0x%X, company: %s, cmd: 0x%X (%s), estimate_only: %d", + tile, TileX(tile), TileY(tile), p1, p2, scope_dumper().CompanyInfo(_current_company), cmd, GetCommandName(cmd), estimate_only); + /* Try to perform the command. */ CommandCost res = ::DoCommandPInternal(tile, p1, p2, cmd, (_networking && !_generating_world) ? ScriptObject::GetActiveInstance()->GetDoCommandCallback() : NULL, text, false, estimate_only, 0);