+bool GenericCAO::visualExpiryRequired(const ObjectProperties &new_) const
+{
+ const ObjectProperties &old = m_prop;
+ /* Visuals do not need to be expired for:
+ * - nametag props: handled by updateNametag()
+ * - textures: handled by updateTextures()
+ * - sprite props: handled by updateTexturePos()
+ * - 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 ||
+ old.mesh != new_.mesh ||
+ old.shaded != new_.shaded ||
+ old.use_texture_alpha != new_.use_texture_alpha ||
+ old.visual != new_.visual ||
+ old.visual_size != new_.visual_size ||
+ old.wield_item != new_.wield_item ||
+ old.colors != new_.colors ||
+ (uses_legacy_texture && old.textures != new_.textures);
+}
+