Skip to content

Commit

Permalink
changes suggested and update hlstrafe
Browse files Browse the repository at this point in the history
  • Loading branch information
khanghugo committed Apr 26, 2024
1 parent ad3577f commit 0fcd61e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
25 changes: 15 additions & 10 deletions BunnymodXT/modules/HwDLL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,19 @@
using namespace std::literals;

// Callbacks for bxt-rs.
struct on_tas_playback_frame_max_accel_yaw_offset {
float value;
float start;
float target;
float accel;
unsigned char dir;
};

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;
on_tas_playback_frame_max_accel_yaw_offset max_accel_yaw_offset;
};

// Change the variable name if you change the parameters!
Expand Down Expand Up @@ -2469,15 +2477,12 @@ int HwDLL::CallOnTASPlaybackFrame() {
StrafeState.StrafeCycleFrameCount,
PrevFractions,
PrevNormalzs,
std::array<float, 5>{
StrafeState.MaxAccelYawOffsetValue,
StrafeState.MaxAccelYawOffsetStart,
StrafeState.MaxAccelYawOffsetTarget,
StrafeState.MaxAccelYawOffsetAccel,
// Eh, meow?
static_cast<float>(
static_cast<unsigned int>(
static_cast<unsigned char>(StrafeState.MaxAccelYawOffsetDir)))
on_tas_playback_frame_max_accel_yaw_offset {
StrafeState.MaxAccelYawOffsetValue, // value
StrafeState.MaxAccelYawOffsetStart, // start
StrafeState.MaxAccelYawOffsetTarget, // target
StrafeState.MaxAccelYawOffsetAccel, // accel
static_cast<unsigned char>(StrafeState.MaxAccelYawOffsetDir), // dir
},
});
}
Expand Down
2 changes: 1 addition & 1 deletion hlstrafe
Submodule hlstrafe updated 3 files
+1 −1 hltas
+12 −19 src/hlstrafe.cpp
+1 −1 src/hlstrafe.hpp

0 comments on commit 0fcd61e

Please sign in to comment.