Add scope info logging to ScriptObject::DoCommand
This commit is contained in:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user