Skip to content
Snippets Groups Projects
Commit 83a87042 authored by SteelT's avatar SteelT
Browse files

Push skin->sprites as light userdata

parent 1320f108
No related branches found
No related tags found
1 merge request!1238Lua: Allow access to skin.sprites[]
......@@ -217,7 +217,7 @@ static int skin_get(lua_State *L)
lua_pushinteger(L, skin->availability);
break;
case skin_sprites:
LUA_PushUserdata(L, skin->sprites, META_SKINSPRITES);
LUA_PushLightUserdata(L, skin->sprites, META_SKINSPRITES);
break;
}
return 1;
......@@ -340,7 +340,7 @@ static const char *const sprites_opt[] = {
// skin.sprites[i] -> sprites[i]
static int lib_getSkinSprite(lua_State *L)
{
spritedef_t *sprites = *((spritedef_t **)luaL_checkudata(L, 1, META_SKINSPRITES));
spritedef_t *sprites = (spritedef_t *)luaL_checkudata(L, 1, META_SKINSPRITES);
playersprite_t i = luaL_checkinteger(L, 2);
if (i < 0 || i >= NUMPLAYERSPRITES*2)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment