mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-17 23:21:22 +00:00
Push skin->sprites as light userdata
This commit is contained in:
parent
1320f10839
commit
83a87042f1
1 changed files with 2 additions and 2 deletions
|
@ -217,7 +217,7 @@ static int skin_get(lua_State *L)
|
||||||
lua_pushinteger(L, skin->availability);
|
lua_pushinteger(L, skin->availability);
|
||||||
break;
|
break;
|
||||||
case skin_sprites:
|
case skin_sprites:
|
||||||
LUA_PushUserdata(L, skin->sprites, META_SKINSPRITES);
|
LUA_PushLightUserdata(L, skin->sprites, META_SKINSPRITES);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -340,7 +340,7 @@ static const char *const sprites_opt[] = {
|
||||||
// skin.sprites[i] -> sprites[i]
|
// skin.sprites[i] -> sprites[i]
|
||||||
static int lib_getSkinSprite(lua_State *L)
|
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);
|
playersprite_t i = luaL_checkinteger(L, 2);
|
||||||
|
|
||||||
if (i < 0 || i >= NUMPLAYERSPRITES*2)
|
if (i < 0 || i >= NUMPLAYERSPRITES*2)
|
||||||
|
|
Loading…
Reference in a new issue