Skip to content

Commit

Permalink
Remove unneeded @:bypassAccessor (#237)
Browse files Browse the repository at this point in the history
  • Loading branch information
kLabz authored Feb 2, 2024
1 parent d31d825 commit 674f83d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions hrt/prefab/l3d/Spline.hx
Original file line number Diff line number Diff line change
Expand Up @@ -235,25 +235,25 @@ class Spline extends Object3D {
//in editor spline can change
#if editor
for (i in 0...children.length) {
if (children[i].to(SplinePoint) != @:bypassAccessor points[i]) {
if (children[i].to(SplinePoint) != points[i]) {
recompute = true;
break;
}
}
#end
// spline never change at runtime, only compute at the beginning
#if !editor
if (@:bypassAccessor points.length == 0)
if (points.length == 0)
recompute = true;
#end
if (recompute) {
@:bypassAccessor points = [];
points = [];
for (c in children) {
var sp = c.to(SplinePoint);
if (sp != null) @:bypassAccessor points.push(sp);
if (sp != null) points.push(sp);
}
}
return @:bypassAccessor points;
return points;
}

@:c public var shape : CurveShape = Linear;
Expand Down

0 comments on commit 674f83d

Please sign in to comment.