Skip to content

Commit

Permalink
change bxt_on_tas_playback_frame to bxt_on_tas_playback_frame_v2
Browse files Browse the repository at this point in the history
  • Loading branch information
khanghugo committed Jul 12, 2024
1 parent 87f29e5 commit 19de4ca
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions BunnymodXT/modules/HwDLL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ extern "C" {
// BXT will call this right before running HLStrafe for every played back frame of a TAS.
//
// Return value != 0 will cause BXT to stop TAS playback.
DLLEXPORT int (*bxt_on_tas_playback_frame)(on_tas_playback_frame_data data);
DLLEXPORT int (*bxt_on_tas_playback_frame_v2)(on_tas_playback_frame_data data);

// BXT will call this when the TAS playback stops.
DLLEXPORT void (*bxt_on_tas_playback_stopped)();
Expand Down Expand Up @@ -2496,10 +2496,10 @@ std::array<float, 3> HwDLL::GetRenderedViewangles() {
}

int HwDLL::CallOnTASPlaybackFrame() {
if (!bxt_on_tas_playback_frame)
if (!bxt_on_tas_playback_frame_v2)
return 0;

return bxt_on_tas_playback_frame(on_tas_playback_frame_data {
return bxt_on_tas_playback_frame_v2(on_tas_playback_frame_data {
StrafeState.StrafeCycleFrameCount,
PrevFractions,
PrevNormalzs,
Expand Down Expand Up @@ -6149,7 +6149,7 @@ void HwDLL::InsertCommands()
pushables,
});

if (bxt_on_tas_playback_frame) {
if (bxt_on_tas_playback_frame_v2) {
const auto stop = CallOnTASPlaybackFrame();
if (stop) {
ResetTASPlaybackState();
Expand Down Expand Up @@ -6683,7 +6683,7 @@ void HwDLL::InsertCommands()
RenderPitchOverrides.clear();
RenderPitchOverrideIndex = 0;

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

0 comments on commit 19de4ca

Please sign in to comment.