mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
Fixed the curve bug for real this time. Last fix to the curve just hid it.
https://bugs.launchpad.net/panda3d/+bug/383969 Happy curving without segfaults!
This commit is contained in:
parent
ca2ec74da7
commit
fa700bd7c3
@ -518,10 +518,6 @@ evaluate(float t, LVecBase3f &xyz, LVecBase3f &hpr) const {
|
||||
}
|
||||
}
|
||||
|
||||
if (default_curve == (ParametricCurve *)NULL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (xyz_curve == (ParametricCurve *)NULL) {
|
||||
xyz_curve = default_curve;
|
||||
}
|
||||
|
@ -82,7 +82,9 @@ bool PiecewiseCurve::
|
||||
get_point(float t, LVecBase3f &point) const {
|
||||
const ParametricCurve *curve;
|
||||
bool result = find_curve(curve, t);
|
||||
|
||||
if (curve == NULL){
|
||||
return false;
|
||||
}
|
||||
// We use | instead of || so we won't short-circuit this calculation.
|
||||
return result | curve->get_point(t, point);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user