CScriptBallTrigger: Fix force calculation

This commit is contained in:
Luke Street 2021-04-02 07:56:24 -04:00
parent 0d934cf608
commit c3c88a434f
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ void CScriptBallTrigger::Think(float dt, CStateManager& mgr) {
} else {
const zeus::CVector3f offset = radiusPosDif.normalized();
if (std::cos(zeus::degToRad(x154_minAngle)) < (-offset).dot(x15c_forceAngle) && distance < x158_maxDistance) {
const float force = zeus::min((1.f / dt * distance), x150_force * (distance * distance));
const float force = zeus::min((1.f / dt * distance), x150_force * (x158_maxDistance / (distance * distance)));
player.ApplyForceWR(force * (player.GetMass() * offset), zeus::CAxisAngle());
}
}