]> git.lizzy.rs Git - minetest.git/commitdiff
content_cao: Fix behavior of legacy "textures" field for wielditems
authorsfan5 <sfan5@live.de>
Thu, 18 Jun 2020 13:11:54 +0000 (15:11 +0200)
committersfan5 <sfan5@live.de>
Thu, 18 Jun 2020 17:36:06 +0000 (19:36 +0200)
src/client/content_cao.cpp

index 5352c35f4761c769273c09f9a6587e1bb12deff5..7f573b5a10b149afd9b08e05c8de38e08cde0c29 100644 (file)
@@ -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)