Skip to content

Commit

Permalink
Merge pull request hxDaedalus#63 from azrafe7/fix-splitedge
Browse files Browse the repository at this point in the history
Fixed wrong index in Mesh.splitEdge() (fixes hxDaedalus#62) (thanks @lo-th)
  • Loading branch information
Justinfront committed Oct 6, 2015
2 parents df24bb3 + 41f2f80 commit 0d7dac1
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/hxDaedalus/data/Mesh.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1018,16 +1018,14 @@ class Mesh
edges = eLeft_Right.fromConstraintSegments[i].edges;
index = edges.indexOf(eLeft_Right);
if (index != -1) {
//TODO: check logic of insert
edges.splice( index, 1 );
edges.insert( index, eLeft_Center );
edges.insert( index+1, eCenter_Right );
} else {
var index2 = edges.indexOf(eRight_Left );
//TODO: check logic of insert
edges.splice( index2, 1);
edges.insert( index2, eRight_Center );
edges.insert( index2, eCenter_Left );
index = edges.indexOf(eRight_Left );
edges.splice( index, 1);
edges.insert( index, eRight_Center );
edges.insert( index+1, eCenter_Left );
}
}

Expand Down

0 comments on commit 0d7dac1

Please sign in to comment.