From 1d1277ba765f84f287e60bc8625d715a1fce7af1 Mon Sep 17 00:00:00 2001 From: bjorn Date: Sun, 3 Sep 2017 17:01:48 -0700 Subject: [PATCH] Fix World:raycast; --- src/api/types/world.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/api/types/world.c b/src/api/types/world.c index fb0bd87c..0e15b261 100644 --- a/src/api/types/world.c +++ b/src/api/types/world.c @@ -25,6 +25,7 @@ static int nextOverlap(lua_State* L) { static void raycastCallback(Shape* shape, float x, float y, float z, float nx, float ny, float nz, void* userdata) { lua_State* L = userdata; luaL_checktype(L, -1, LUA_TFUNCTION); + lua_pushvalue(L, -1); luax_pushshape(L, shape); lua_pushnumber(L, x); lua_pushnumber(L, y);