瀏覽代碼

Fix World:getJoints to return fully resolved types for joints.

Alex Szpakowski 6 年之前
父節點
當前提交
91d425e7e1
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      src/modules/physics/box2d/World.cpp

+ 4 - 1
src/modules/physics/box2d/World.cpp

@@ -26,6 +26,9 @@
 #include "Physics.h"
 #include "common/Reference.h"
 
+// Needed for World::getJoints. It should be moved to wrapper code...
+#include "wrap_Joint.h"
+
 namespace love
 {
 namespace physics
@@ -503,7 +506,7 @@ int World::getJoints(lua_State *L) const
 		if (!j) break;
 		Joint *joint = (Joint *)findObject(j);
 		if (!joint) throw love::Exception("A joint has escaped Memoizer!");
-		luax_pushtype(L, joint);
+		luax_pushjoint(L, joint);
 		lua_rawseti(L, -2, i);
 		i++;
 	}