Skip to content

Commit

Permalink
Add bxt-rs accelerated yawspeed related hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
khanghugo committed Apr 2, 2024
1 parent 76aefb2 commit e99edaf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions BunnymodXT/modules/HwDLL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ struct on_tas_playback_frame_data {
unsigned strafe_cycle_frame_count;
std::array<float, 4> prev_predicted_trace_fractions;
std::array<float, 4> prev_predicted_trace_normal_zs;
std::array<float, 5> accelerated_yawspeed;
};

// Change the variable name if you change the parameters!
Expand Down Expand Up @@ -2468,6 +2469,16 @@ int HwDLL::CallOnTASPlaybackFrame() {
StrafeState.StrafeCycleFrameCount,
PrevFractions,
PrevNormalzs,
std::array<float, 5>{
StrafeState.AcceleratedYawSpeedValue,
StrafeState.AcceleratedYawSpeedStart,
StrafeState.AcceleratedYawSpeedTarget,
StrafeState.AcceleratedYawSpeedAccel,
// Eh, meow?
static_cast<float>(
static_cast<unsigned int>(
static_cast<unsigned char>(StrafeState.AcceleratedYawSpeedDir)))
},
});
}

Expand Down
2 changes: 1 addition & 1 deletion hlstrafe
Submodule hlstrafe updated 3 files
+1 −1 hltas
+74 −4 src/hlstrafe.cpp
+10 −0 src/hlstrafe.hpp

0 comments on commit e99edaf

Please sign in to comment.