From ec53e122947acdf87dbafc347362a0a30fba41de Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Sun, 16 Dec 2018 18:19:53 -0500 Subject: [PATCH 1/2] Foolish --- src/lua_baselib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lua_baselib.c b/src/lua_baselib.c index a178b17fb..e53ec2523 100644 --- a/src/lua_baselib.c +++ b/src/lua_baselib.c @@ -2185,8 +2185,8 @@ static luaL_Reg lib[] = { {"R_SetPlayerSkin",lib_rSetPlayerSkin}, // r_data - {"R_CheckTextureNumForName",lib_rCheckTextureNumForName), - {"R_TextureNumForName",lib_rTextureNumForName), + {"R_CheckTextureNumForName",lib_rCheckTextureNumForName}, + {"R_TextureNumForName",lib_rTextureNumForName}, // s_sound {"S_StartSound",lib_sStartSound}, From bef3bb23f8c90aee94eae11dec7cb00c630f4c84 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Sun, 16 Dec 2018 21:36:54 -0500 Subject: [PATCH 2/2] Undo dc92bb49 --- src/lua_baselib.c | 19 +++++++++++++++++++ src/lua_maplib.c | 8 ++++---- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/lua_baselib.c b/src/lua_baselib.c index e6efb40e4..e53ec2523 100644 --- a/src/lua_baselib.c +++ b/src/lua_baselib.c @@ -1682,6 +1682,25 @@ static int lib_rSetPlayerSkin(lua_State *L) return 0; } +// R_DATA +//////////// + +static int lib_rCheckTextureNumForName(lua_State *L) +{ + const char *name = luaL_checkstring(L, 1); + //HUDSAFE + lua_pushinteger(L, R_CheckTextureNumForName(name)); + return 1; +} + +static int lib_rTextureNumForName(lua_State *L) +{ + const char *name = luaL_checkstring(L, 1); + //HUDSAFE + lua_pushinteger(L, R_TextureNumForName(name)); + return 1; +} + // S_SOUND //////////// diff --git a/src/lua_maplib.c b/src/lua_maplib.c index efe9e6f4c..5eb6cb4a1 100644 --- a/src/lua_maplib.c +++ b/src/lua_maplib.c @@ -795,16 +795,16 @@ static int side_set(lua_State *L) side->rowoffset = luaL_checkfixed(L, 3); break; case side_toptexture: - side->toptexture = luaL_checkinteger(L, 3); + side->toptexture = luaL_checkinteger(L, 3); break; case side_bottomtexture: - side->bottomtexture = luaL_checkinteger(L, 3); + side->bottomtexture = luaL_checkinteger(L, 3); break; case side_midtexture: - side->midtexture = luaL_checkinteger(L, 3); + side->midtexture = luaL_checkinteger(L, 3); break; case side_repeatcnt: - side->repeatcnt = luaL_checkinteger(L, 3); + side->repeatcnt = luaL_checkinteger(L, 3); break; } return 0;