-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Curvy Cruves #482
base: master
Are you sure you want to change the base?
Curvy Cruves #482
Conversation
Have you tested it? |
Yes, the current |
Tested, it seems to work just fine. |
source/game_sa/Curves.cpp
Outdated
@@ -74,58 +75,9 @@ void CCurves::CalcCurvePoint( | |||
) { | |||
timeProgress = std::clamp(timeProgress, 0.f, 1.f); | |||
|
|||
const auto [pos, speedScale] = [&]() -> std::tuple<CVector, float> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so you just removed this code? You should just comment it out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're absolutely right.
const auto curveFactor = CalcSpeedVariationInBend(startPos, endPos, startDir, endDir); | ||
const auto curvePoint = lerp(startPos, endPos, timeProgress); | ||
|
||
outPos = curvePoint + (curveFactor * (endDir - startDir)); | ||
outSpeed = lerp(startDir, endDir, timeProgress) / ((float)totalTimeMs / 1000.f); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tbh i'd just not hook it
this code can't possibly be 100% correct
Will have to test it.