aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api
diff options
context:
space:
mode:
authorTeTpaAka <TeTpaAka@users.noreply.github.com>2015-05-15 22:16:39 +0200
committerkwolekr <kwolekr@minetest.net>2015-05-15 16:21:56 -0400
commit19cbb6b37b9a35df7892bde5aad138266496eb8f (patch)
treeaa984b253a03dc2e60d0236cac274ef0ff075ad1 /src/script/lua_api
parent18c2f16c138f4b40b4705507b46d24e1518e4705 (diff)
downloadminetest-19cbb6b37b9a35df7892bde5aad138266496eb8f.tar.gz
minetest-19cbb6b37b9a35df7892bde5aad138266496eb8f.tar.bz2
minetest-19cbb6b37b9a35df7892bde5aad138266496eb8f.zip
Add push_ARGB8 to script/common/c_converter
Diffstat (limited to 'src/script/lua_api')
-rw-r--r--src/script/lua_api/l_object.cpp10
1 files changed, 1 insertions, 9 deletions
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;