aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api
diff options
context:
space:
mode:
authorRui <rui.minetest@gmail.com>2017-01-12 04:25:25 +0900
committerNer'zhul <nerzhul@users.noreply.github.com>2017-01-11 20:25:25 +0100
commit5d60a6c533efb572a4004d110536da63bb62c58a (patch)
treed43f623735495ede1b8d32be7302e5a14e1f6a69 /src/script/lua_api
parent430d3b28e46b16e1411ec0ecb6c0d0ab9d6feb63 (diff)
downloadminetest-5d60a6c533efb572a4004d110536da63bb62c58a.tar.gz
minetest-5d60a6c533efb572a4004d110536da63bb62c58a.tar.bz2
minetest-5d60a6c533efb572a4004d110536da63bb62c58a.zip
Make nametag removable with set_nametag_attributes (#5021)
Diffstat (limited to 'src/script/lua_api')
-rw-r--r--src/script/lua_api/l_object.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/script/lua_api/l_object.cpp b/src/script/lua_api/l_object.cpp
index 84d14d521..506e56df9 100644
--- a/src/script/lua_api/l_object.cpp
+++ b/src/script/lua_api/l_object.cpp
@@ -789,8 +789,7 @@ int ObjectRef::l_set_nametag_attributes(lua_State *L)
lua_pop(L, 1);
std::string nametag = getstringfield_default(L, 2, "text", "");
- if (nametag != "")
- prop->nametag = nametag;
+ prop->nametag = nametag;
co->notifyObjectPropertiesModified();
lua_pushboolean(L, true);