mirror of
https://github.com/love2d/love.git
synced 2026-08-20 04:30:09 +02:00
Improve error checking in love.physics.new*Shape
This commit is contained in:
@@ -275,7 +275,7 @@ int w_newFixture(lua_State *L)
|
|||||||
|
|
||||||
static Body *luax_optbodyforshape(lua_State *L, int idx, const char *name)
|
static Body *luax_optbodyforshape(lua_State *L, int idx, const char *name)
|
||||||
{
|
{
|
||||||
if (luax_istype(L, idx, Body::type))
|
if (lua_isnoneornil(L, idx) || luax_istype(L, idx, Object::type))
|
||||||
return luax_checkbody(L, idx);
|
return luax_checkbody(L, idx);
|
||||||
|
|
||||||
luax_markdeprecated(L, 1, name, API_FUNCTION_VARIANT, DEPRECATED_REPLACED, "variant with Body parameter");
|
luax_markdeprecated(L, 1, name, API_FUNCTION_VARIANT, DEPRECATED_REPLACED, "variant with Body parameter");
|
||||||
|
|||||||
Reference in New Issue
Block a user