summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2020-06-18 15:11:54 +0200
committersfan5 <sfan5@live.de>2020-06-18 19:36:06 +0200
commit495f7198ef8336048fd3a03a9705fe45dbd57574 (patch)
tree07b5de6245de52154f218d6a3a8b7bb7e2d421df /src
parent469e8d8b7eb71a4650fb842024ef505153ab9cd2 (diff)
downloadminetest-495f7198ef8336048fd3a03a9705fe45dbd57574.tar.gz
minetest-495f7198ef8336048fd3a03a9705fe45dbd57574.tar.bz2
minetest-495f7198ef8336048fd3a03a9705fe45dbd57574.zip
content_cao: Fix behavior of legacy "textures" field for wielditems
Diffstat (limited to 'src')
-rw-r--r--src/client/content_cao.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/content_cao.cpp b/src/client/content_cao.cpp
index 5352c35f4..7f573b5a1 100644
--- a/src/client/content_cao.cpp
+++ b/src/client/content_cao.cpp
@@ -1506,6 +1506,9 @@ bool GenericCAO::visualExpiryRequired(const ObjectProperties &new_) const
* - glow: handled by updateLight()
* - any other properties that do not change appearance
*/
+
+ bool uses_legacy_texture = new_.wield_item.empty() &&
+ (new_.visual == "wielditem" || new_.visual == "item");
// Ordered to compare primitive types before std::vectors
return old.backface_culling != new_.backface_culling ||
old.is_visible != new_.is_visible ||
@@ -1515,7 +1518,8 @@ bool GenericCAO::visualExpiryRequired(const ObjectProperties &new_) const
old.visual != new_.visual ||
old.visual_size != new_.visual_size ||
old.wield_item != new_.wield_item ||
- old.colors != new_.colors;
+ old.colors != new_.colors ||
+ (uses_legacy_texture && old.textures != new_.textures);
}
void GenericCAO::processMessage(const std::string &data)