Skip to content

Commit 495f719

Browse files
committedJun 18, 2020
content_cao: Fix behavior of legacy "textures" field for wielditems
1 parent 469e8d8 commit 495f719

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎src/client/content_cao.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -1506,6 +1506,9 @@ bool GenericCAO::visualExpiryRequired(const ObjectProperties &new_) const
15061506
* - glow: handled by updateLight()
15071507
* - any other properties that do not change appearance
15081508
*/
1509+
1510+
bool uses_legacy_texture = new_.wield_item.empty() &&
1511+
(new_.visual == "wielditem" || new_.visual == "item");
15091512
// Ordered to compare primitive types before std::vectors
15101513
return old.backface_culling != new_.backface_culling ||
15111514
old.is_visible != new_.is_visible ||
@@ -1515,7 +1518,8 @@ bool GenericCAO::visualExpiryRequired(const ObjectProperties &new_) const
15151518
old.visual != new_.visual ||
15161519
old.visual_size != new_.visual_size ||
15171520
old.wield_item != new_.wield_item ||
1518-
old.colors != new_.colors;
1521+
old.colors != new_.colors ||
1522+
(uses_legacy_texture && old.textures != new_.textures);
15191523
}
15201524

15211525
void GenericCAO::processMessage(const std::string &data)

0 commit comments

Comments
 (0)
Please sign in to comment.