Skip to content

Commit

Permalink
fix: prevent unintended autostrafe target reaching
Browse files Browse the repository at this point in the history
  • Loading branch information
Krzyhau committed Sep 8, 2024
1 parent ecafec5 commit c682a73
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Features/Tas/TasTools/StrafeTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ bool AutoStrafeTool::IsMovementAffectedByPitch(const TasPlayerInfo &pInfo) {
bool AutoStrafeTool::TryReachTargetValues(TasFramebulk &bulk, const TasPlayerInfo &pInfo) {
// Attempting to check if target velocity and angle can be reached within a single tick,
// in which case, we'll try to be precise about the force of our movement input.

// our target angle is too big to be ever reached
if (fabsf(params.strafeDir.angle) > 360.0f) {
return false;
}

Vector velocity = GetGroundFrictionVelocity(pInfo);
velocity.z = 0;

Expand Down

0 comments on commit c682a73

Please sign in to comment.