Allow updating replay bot name without being a WR

This allows editing the replay bot's name through the frame_cache_t of the replay data, which is useful for personal replays. Without this change, the replay bot's name after calling Shavit_StartReplayFromFrameCache would be the current WR's player name.
This commit is contained in:
BoomShot 2024-05-28 00:07:04 -04:00 committed by GitHub
parent 2805cd94c6
commit 654f9aa239
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2132,7 +2132,16 @@ void FormatStyle(const char[] source, int style, bool central, int track, char d
else
{
FormatSeconds(GetReplayLength(style, track, aCache), sTime, 16);
if(aCache.bNewFormat)
{
strcopy(sName, sizeof(sName), aCache.sReplayName);
}
else
{
GetReplayName(style, track, sName, sizeof(sName));
}
ReplaceString(temp, sizeof(temp), "{style}", gS_StyleStrings[style].sStyleName);
ReplaceString(temp, sizeof(temp), "{styletag}", gS_StyleStrings[style].sClanTag);
}