Skip to content

Commit

Permalink
revert breaking out as IsStab() (#692)
Browse files Browse the repository at this point in the history
  • Loading branch information
NoSloppy authored Sep 2, 2024
1 parent c05e9f9 commit 59e43d7
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions props/prop_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -768,11 +768,6 @@ class PropBase : CommandParser, Looper, protected SaberBase, public ModeInterfac
return false;
}

virtual bool IsStab(const Vec3& diff) const {
return diff.x < -2.0 * sqrtf(diff.y * diff.y + diff.z * diff.z) &&
fusor.swing_speed() < 150;
}

// Potentially called from interrupt!
virtual void DoMotion(const Vec3& motion, bool clear) {
fusor.DoMotion(motion, clear);
Expand Down Expand Up @@ -816,7 +811,8 @@ class PropBase : CommandParser, Looper, protected SaberBase, public ModeInterfac
if ( (accel_ - fusor.down()).len2() > (accel - fusor.down()).len2() ) {
diff = -diff;
}
bool stab = IsStab(diff);
bool stab = diff.x < - 2.0 * sqrtf(diff.y * diff.y + diff.z * diff.z) &&
fusor.swing_speed() < 150;

if (clash_pending1_) {
pending_clash_strength1_ = std::max<float>(v, (float)pending_clash_strength1_);
Expand Down

0 comments on commit 59e43d7

Please sign in to comment.