diff --git a/ag.cc b/ag.cc index 56ee029..3da211c 100644 --- a/ag.cc +++ b/ag.cc @@ -97,7 +97,7 @@ namespace ag " return iter_func, table, 0\n" "end\n" - "ag.createAMotor = function(obj1, obj2, axis1, axis2, axis3)\n" + "ag.createAMotor = function(obj1, obj2, axis0, axis1, axis2)\n" " local o1 = obj1\n" " local o2 = obj2\n" " local num_axes = 1\n" @@ -111,6 +111,20 @@ namespace ag " o2 = { id = 0 }\n" " end\n" " end\n" + " local num_axes = 0\n" + " if (axis0 ~= nil) then\n" + " setAMotorAxis(0, axis0)\n" + " num_axes = 1\n" + " if (axis1 ~= nil) then\n" + " setAMotorAxis(1, axis1)\n" + " num_axes = 1\n" + " if (axis2 ~= nil) then\n" + " setAMotorAxis(2, axis2)\n" + " num_axes = 2\n" + " end\n" + " end\n" + " end\n" + " ag.setAMotorNumAxes(num_axes)\n" "end\n" ); lua_pcall(L, 0, 0, 0);