1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-12 17:19:09 +00:00

Codechange: LogCommandExecution writes economy date, not calendar date

Outside of Real-Time Mode, these are the same date, so debugging date-based events is still possible.
This commit is contained in:
Tyler Trahan
2023-12-15 09:19:22 -05:00
parent c88a2816eb
commit fc01bb5024

View File

@@ -18,7 +18,7 @@
#include "strings_func.h"
#include "texteff.hpp"
#include "town.h"
#include "timer/timer_game_calendar.h"
#include "timer/timer_game_economy.h"
#include "company_func.h"
#include "company_base.h"
#include "signal_func.h"
@@ -274,7 +274,7 @@ void CommandHelperBase::InternalPostResult(const CommandCost &res, TileIndex til
/** Helper to make a desync log for a command. */
void CommandHelperBase::LogCommandExecution(Commands cmd, StringID err_message, TileIndex tile, const CommandDataBuffer &args, bool failed)
{
Debug(desync, 1, "{}: {:08x}; {:02x}; {:02x}; {:08x}; {:08x}; {:06x}; {} ({})", failed ? "cmdf" : "cmd", TimerGameCalendar::date, TimerGameCalendar::date_fract, (int)_current_company, cmd, err_message, tile, FormatArrayAsHex(args), GetCommandName(cmd));
Debug(desync, 1, "{}: {:08x}; {:02x}; {:02x}; {:08x}; {:08x}; {:06x}; {} ({})", failed ? "cmdf" : "cmd", TimerGameEconomy::date, TimerGameEconomy::date_fract, (int)_current_company, cmd, err_message, tile, FormatArrayAsHex(args), GetCommandName(cmd));
}
/**