Skip to content

Commit

Permalink
hw: Call OnTASPlaybackStopped() one frame later
Browse files Browse the repository at this point in the history
  • Loading branch information
YaLTeR committed Jul 8, 2023
1 parent 1f6731b commit db91df7
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions BunnymodXT/modules/HwDLL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5935,12 +5935,8 @@ void HwDLL::InsertCommands()

// Ran through all frames.
if (currentFramebulk >= totalFramebulks) {
CallOnTASPlaybackStopped();
runningFrames = false;

RenderYawOverrides.clear();
RenderYawOverrideIndex = 0;

if (!exportFilename.empty()) {
auto error = exportResult.Save(exportFilename);
if (error.Code == HLTAS::ErrorCode::OK)
Expand All @@ -5959,6 +5955,16 @@ void HwDLL::InsertCommands()
}
} else {
if (wasRunningFrames) {
RenderYawOverrides.clear();
RenderYawOverrideIndex = 0;

if (bxt_on_tas_playback_frame) {
// We don't use the return value here because we stop anyway.
CallOnTASPlaybackFrame();
}

CallOnTASPlaybackStopped();

ORIG_Cbuf_InsertText("host_framerate 0;_bxt_min_frametime 0;bxt_taslog 0\n");
if (sensitivityToRestore != 0) {
std::ostringstream ss;
Expand Down

0 comments on commit db91df7

Please sign in to comment.