Skip to content

Commit

Permalink
content_cao: Fix behavior of legacy "textures" field for wielditems
Browse files Browse the repository at this point in the history
  • Loading branch information
sfan5 committed Jun 18, 2020
1 parent 469e8d8 commit 495f719
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/client/content_cao.cpp
Expand Up @@ -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 ||
Expand All @@ -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)
Expand Down

0 comments on commit 495f719

Please sign in to comment.