Skip to content

Commit

Permalink
Make the unsupported replay version warning more compact
Browse files Browse the repository at this point in the history
  • Loading branch information
Alayan-stk-2 committed Nov 29, 2023
1 parent 5bb5f5e commit 4ca872f
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/replay/replay_play.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,20 @@ bool ReplayPlay::addReplayFile(const std::string& fn, bool custom_replay, int ca
"found in replay file (bogus replay file).");
return false;
}
if (version > getCurrentReplayVersion() ||
version < getMinSupportedReplayVersion() )
if ( version < getMinSupportedReplayVersion() )
{
Log::warn("Replay", "Replay is version '%d'", version);
Log::warn("Replay", "STK replay version is '%d'", getCurrentReplayVersion());
Log::warn("Replay", "Minimum supported replay version is '%d'", getMinSupportedReplayVersion());
Log::warn("Replay", "Skipped '%s'", fn.c_str());
Log::warn("Replay", "Replay is version '%d', Minimum supported replay version is '%d', skipped '%s'",
version, getMinSupportedReplayVersion(), fn.c_str());
return false;
}
rd.m_replay_version = version;
else if (version > getCurrentReplayVersion())
{
Log::warn("Replay", "Replay is version '%d', STK replay version is '%d', skipped '%s'",
version, getCurrentReplayVersion(), fn.c_str());
return false;
}

rd.m_replay_version = version;

if (version >= 4)
{
Expand Down

0 comments on commit 4ca872f

Please sign in to comment.