Skip to content

Commit

Permalink
[Replay] #370: Fixed an issue with "Clear after meeting" (#371)
Browse files Browse the repository at this point in the history
  • Loading branch information
cddjr committed May 31, 2022
1 parent 9ead3b2 commit a326693
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions gui/replay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ namespace Replay
}
}

void Reset()
void Reset(bool all /* = true */)
{
std::lock_guard<std::mutex> replayLock(Replay::replayEventMutex);
for (auto& e : State.liveReplayEvents)
Expand All @@ -79,7 +79,8 @@ namespace Replay
for (size_t plyIdx = 0; plyIdx < MAX_PLAYERS; plyIdx++)
{
State.lastWalkEventPosPerPlayer[plyIdx] = ImVec2(0.f, 0.f);
State.replayDeathTimePerPlayer[plyIdx] = (std::chrono::system_clock::time_point::max)();// TODO: #define NOMINMAX
if (all)
State.replayDeathTimePerPlayer[plyIdx] = (std::chrono::system_clock::time_point::max)();// TODO: #define NOMINMAX
}

// Set this to true as the default value
Expand Down
2 changes: 1 addition & 1 deletion gui/replay.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Replay
{
extern std::mutex replayEventMutex;
void Init();
void Reset();
void Reset(bool all = true);
void Render();

struct WalkEvent_LineData
Expand Down
2 changes: 1 addition & 1 deletion hooks/MeetingHud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ void dMeetingHud_Close(MeetingHud* __this, MethodInfo* method) {

if (State.Replay_ClearAfterMeeting)
{
Replay::Reset();
Replay::Reset(false);
}

MeetingHud_Close(__this, method);
Expand Down

0 comments on commit a326693

Please sign in to comment.