mirror of
https://github.com/love2d/love.git
synced 2026-08-19 04:06:17 +02:00
Fix World:getJoints to return fully resolved types for joints.
This commit is contained in:
@@ -26,6 +26,9 @@
|
|||||||
#include "Physics.h"
|
#include "Physics.h"
|
||||||
#include "common/Reference.h"
|
#include "common/Reference.h"
|
||||||
|
|
||||||
|
// Needed for World::getJoints. It should be moved to wrapper code...
|
||||||
|
#include "wrap_Joint.h"
|
||||||
|
|
||||||
namespace love
|
namespace love
|
||||||
{
|
{
|
||||||
namespace physics
|
namespace physics
|
||||||
@@ -503,7 +506,7 @@ int World::getJoints(lua_State *L) const
|
|||||||
if (!j) break;
|
if (!j) break;
|
||||||
Joint *joint = (Joint *)findObject(j);
|
Joint *joint = (Joint *)findObject(j);
|
||||||
if (!joint) throw love::Exception("A joint has escaped Memoizer!");
|
if (!joint) throw love::Exception("A joint has escaped Memoizer!");
|
||||||
luax_pushtype(L, joint);
|
luax_pushjoint(L, joint);
|
||||||
lua_rawseti(L, -2, i);
|
lua_rawseti(L, -2, i);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user