Store some desync messages in a ring buffer, append to log on desync
This commit is contained in:
@@ -382,6 +382,7 @@ static void ShutdownGame()
|
||||
InvalidateVehicleTickCaches();
|
||||
ClearVehicleTickCaches();
|
||||
ClearCommandLog();
|
||||
ClearDesyncMsgLog();
|
||||
|
||||
_game_events_since_load = (GameEventFlags) 0;
|
||||
_game_events_overall = (GameEventFlags) 0;
|
||||
@@ -1304,7 +1305,11 @@ void CheckCaches(bool force_check, std::function<void(const char *)> log)
|
||||
#define CCLOG(...) { \
|
||||
seprintf(cclog_buffer, lastof(cclog_buffer), __VA_ARGS__); \
|
||||
DEBUG(desync, 0, "%s", cclog_buffer); \
|
||||
if (log) log(cclog_buffer); \
|
||||
if (log) { \
|
||||
log(cclog_buffer); \
|
||||
} else { \
|
||||
LogDesyncMsg(cclog_buffer); \
|
||||
} \
|
||||
}
|
||||
|
||||
/* Check the town caches. */
|
||||
|
Reference in New Issue
Block a user