From 19cbb6b37b9a35df7892bde5aad138266496eb8f Mon Sep 17 00:00:00 2001 From: TeTpaAka Date: Fri, 15 May 2015 22:16:39 +0200 Subject: Add push_ARGB8 to script/common/c_converter --- src/script/lua_api/l_object.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/script/lua_api/l_object.cpp') diff --git a/src/script/lua_api/l_object.cpp b/src/script/lua_api/l_object.cpp index 845aab732..74903df5f 100644 --- a/src/script/lua_api/l_object.cpp +++ b/src/script/lua_api/l_object.cpp @@ -1305,15 +1305,7 @@ int ObjectRef::l_get_nametag_attributes(lua_State *L) video::SColor color = playersao->getNametagColor(); lua_newtable(L); - lua_newtable(L); - lua_pushnumber(L, color.getAlpha()); - lua_setfield(L, -2, "a"); - lua_pushnumber(L, color.getRed()); - lua_setfield(L, -2, "r"); - lua_pushnumber(L, color.getGreen()); - lua_setfield(L, -2, "g"); - lua_pushnumber(L, color.getBlue()); - lua_setfield(L, -2, "b"); + push_ARGB8(L, color); lua_setfield(L, -2, "color"); return 1; -- cgit v1.2.3