Permalink
Browse files

Bug fixes to recognizer and mcp.

  • Loading branch information...
1 parent 597bdef commit 0aaa7fb1fe6a0a7091a12488dfc7d6a72e2dfdc6 @ben-sangster ben-sangster committed Sep 9, 2010
Showing with 2 additions and 3 deletions.
  1. +1 −1 scripts/mcp.js
  2. +1 −2 scripts/recognizer.js
View
2 scripts/mcp.js
@@ -77,7 +77,7 @@ assignPointsToCycles = function () {
Object.keys(CycleList).forEach(function (key) {
cycle = CycleList[key];
if (cycle.point) {
- dmz.object.unlinkSubLinks(cycle.point.handle, dmz.consts.StartLinkHandle)
+ dmz.object.unlinkSubObjects(cycle.point.handle, dmz.consts.StartLinkHandle)
delete cycle.point;
}
});
View
3 scripts/recognizer.js
@@ -131,7 +131,6 @@ dmz.object.flag.observe(self, "Recognizer_Controlled", function (obj, attr, valu
, offset = Infinity
, distance
, count = 0
- , index
;
Objs[obj] = obj;
@@ -140,7 +139,7 @@ dmz.object.flag.observe(self, "Recognizer_Controlled", function (obj, attr, valu
distance = (path[count].subtract(pos)).magnitude();
if (offset > distance) {
offset = distance;
- target = index;
+ target = count;
}
}
dmz.object.counter(obj, TargetHandle, target);

0 comments on commit 0aaa7fb

Please sign in to comment.