mirror of
https://github.com/love2d/love.git
synced 2026-08-19 20:19:42 +02:00
Fix Shape:testPoint's stack indices (issue #430)
This commit is contained in:
@@ -60,11 +60,11 @@ namespace box2d
|
|||||||
int w_Shape_testPoint(lua_State * L)
|
int w_Shape_testPoint(lua_State * L)
|
||||||
{
|
{
|
||||||
Shape * t = luax_checkshape(L, 1);
|
Shape * t = luax_checkshape(L, 1);
|
||||||
float x = (float)luaL_checknumber(L, 1);
|
float x = (float)luaL_checknumber(L, 2);
|
||||||
float y = (float)luaL_checknumber(L, 2);
|
float y = (float)luaL_checknumber(L, 3);
|
||||||
float r = (float)luaL_checknumber(L, 3);
|
float r = (float)luaL_checknumber(L, 4);
|
||||||
float px = (float)luaL_checknumber(L, 4);
|
float px = (float)luaL_checknumber(L, 5);
|
||||||
float py = (float)luaL_checknumber(L, 5);
|
float py = (float)luaL_checknumber(L, 6);
|
||||||
bool result = t->testPoint(x, y, r, px, py);
|
bool result = t->testPoint(x, y, r, px, py);
|
||||||
lua_pushboolean(L, result);
|
lua_pushboolean(L, result);
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user