summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorquabug <quabug@gmail.com>2015-01-16 14:39:11 +0800
committerquabug <quabug@gmail.com>2015-01-16 15:16:58 +0800
commit341ea429db6be0179fc3d9f4fcfcf3dd1c660b03 (patch)
treebd9cfdf419a307e8e7e314ec400c3c7452994980
parent5823f90c53dee251f2edfcbde6c8bb3a0c943e11 (diff)
remove useless code
-rw-r--r--scene/resources/curve.cpp18
1 files changed, 2 insertions, 16 deletions
diff --git a/scene/resources/curve.cpp b/scene/resources/curve.cpp
index 1228e7e857..7c2fa4d6f4 100644
--- a/scene/resources/curve.cpp
+++ b/scene/resources/curve.cpp
@@ -541,19 +541,12 @@ void Curve2D::_bake() const {
Vector2 pos=points[0].pos;
- int point=0;
- float ofs=0;
List<Vector2> pointlist;
for(int i=0;i<points.size()-1;i++) {
- float slen=points[i].pos.distance_to(points[i+1].pos);
- float divs = slen / bake_interval;
- if (divs>1)
- divs=1;
-
- float step = 0.1; // 10 substeps ought to be enough?
+ float step = 0.1; // at least 10 substeps ought to be enough?
float p = 0;
while(p<1.0) {
@@ -1014,19 +1007,12 @@ void Curve3D::_bake() const {
Vector3 pos=points[0].pos;
- int point=0;
- float ofs=0;
List<Plane> pointlist;
pointlist.push_back(Plane(pos,points[0].tilt));
for(int i=0;i<points.size()-1;i++) {
- float slen=points[i].pos.distance_to(points[i+1].pos);
- float divs = slen / bake_interval;
- if (divs>1)
- divs=1;
-
- float step = 0.1; // 10 substeps ought to be enough?
+ float step = 0.1; // at least 10 substeps ought to be enough?
float p = 0;
while(p<1.0) {