Clear velocity only if it's not ignored

This commit is contained in:
smallmodel 2024-07-27 18:17:10 +02:00
parent 7b238e9d34
commit fecb601fc4
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512

View file

@ -1442,7 +1442,9 @@ void ScriptSlave::EndPath(Event *ev)
delete splinePath;
splinePath = NULL;
velocity = vec_zero;
if (!ignorevelocity) {
velocity = vec_zero;
}
if (!ignoreangles) {
avelocity = vec_zero;
}
@ -1639,7 +1641,9 @@ void ScriptSlave::FollowingPath(Event *ev)
if ((splinePath->GetType() == SPLINE_CLAMP) && (splineTime > (splinePath->EndPoint() - 2))) {
delete splinePath;
splinePath = NULL;
velocity = vec_zero;
if (!ignorevelocity) {
velocity = vec_zero;
}
if (!ignoreangles) {
avelocity = vec_zero;
}