diff --git a/modules/you_done_it/pinned_photo.cpp b/modules/you_done_it/pinned_photo.cpp index 840bffbf..690456b3 100644 --- a/modules/you_done_it/pinned_photo.cpp +++ b/modules/you_done_it/pinned_photo.cpp @@ -5,6 +5,7 @@ #include "scene/2d/mesh_instance_2d.h" #include "you_done_it/clue_db.h" #include "you_done_it/conclusion_field.h" +#include "you_done_it/ydi_networking.h" void PinnedPhoto::_bind_methods() { BIND_PROPERTY(Variant::BOOL, can_drop); @@ -19,6 +20,7 @@ void PinnedPhoto::enter_tree() { void PinnedPhoto::on_child_entered_tree(Node *node) { if (MeshInstance2D * meshinst{ cast_to(node) }) { this->photo_mesh = meshinst; + set_clue(get_clue()); // force reset clue to update image } } @@ -95,7 +97,7 @@ bool PinnedPhoto::get_can_drop() const { void PinnedPhoto::set_clue(NetworkData::ClueID id) { this->clue = id; - if (photo_mesh) { + if (photo_mesh && this->clue != NetworkData::CLUE_MAX) { Ref texture{ ClueDB::get_singleton()->get_clue(id)->get_image() }; if (texture.is_valid()) { photo_mesh->set_texture(texture);