Skip to content

Commit

Permalink
Merge pull request #771 from jmiskovic/fix/joint-typecheck
Browse files Browse the repository at this point in the history
Fix remaining assertions of the Joint type
  • Loading branch information
bjornbytes committed May 9, 2024
2 parents f0c1952 + 4c0c8f3 commit 4fce724
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/api/l_physics_joints.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ static int l_lovrJointGetColliders(lua_State* L) {
}

static int l_lovrJointGetUserData(lua_State* L) {
luax_checktype(L, 1, Joint);
luax_checkjoint(L, 1);
luax_pushstash(L, "lovr.joint.userdata");
lua_pushvalue(L, 1);
lua_rawget(L, -2);
return 1;
}

static int l_lovrJointSetUserData(lua_State* L) {
luax_checktype(L, 1, Joint);
luax_checkjoint(L, 1);
luax_pushstash(L, "lovr.joint.userdata");
lua_pushvalue(L, 1);
lua_pushvalue(L, 2);
Expand All @@ -86,14 +86,14 @@ static int l_lovrJointSetUserData(lua_State* L) {
}

static int l_lovrJointGetPriority(lua_State* L) {
Joint* joint = luax_checktype(L, 1, Joint);
Joint* joint = luax_checkjoint(L, 1);
uint32_t priority = lovrJointGetPriority(joint);
lua_pushinteger(L, priority);
return 1;
}

static int l_lovrJointSetPriority(lua_State* L) {
Joint* joint = luax_checktype(L, 1, Joint);
Joint* joint = luax_checkjoint(L, 1);
uint32_t priority = luax_checku32(L, 2);
lovrJointSetPriority(joint, priority);
return 0;
Expand Down

0 comments on commit 4fce724

Please sign in to comment.