mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 01:24:36 +02:00
Merge pull request #12824 from SamGondelman/matFix
Fix non-client-only material entities applied to avatar by session ID not being removed on domain switch
This commit is contained in:
commit
67a8e6c82e
2 changed files with 5 additions and 6 deletions
|
@ -27,6 +27,10 @@ MaterialEntityItem::MaterialEntityItem(const EntityItemID& entityItemID) : Entit
|
||||||
_type = EntityTypes::Material;
|
_type = EntityTypes::Material;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MaterialEntityItem::~MaterialEntityItem() {
|
||||||
|
removeMaterial();
|
||||||
|
}
|
||||||
|
|
||||||
EntityItemProperties MaterialEntityItem::getProperties(EntityPropertyFlags desiredProperties) const {
|
EntityItemProperties MaterialEntityItem::getProperties(EntityPropertyFlags desiredProperties) const {
|
||||||
EntityItemProperties properties = EntityItem::getProperties(desiredProperties); // get the properties from our base class
|
EntityItemProperties properties = EntityItem::getProperties(desiredProperties); // get the properties from our base class
|
||||||
COPY_ENTITY_PROPERTY_TO_PROPERTIES(materialURL, getMaterialURL);
|
COPY_ENTITY_PROPERTY_TO_PROPERTIES(materialURL, getMaterialURL);
|
||||||
|
@ -312,11 +316,6 @@ void MaterialEntityItem::postParentFixup() {
|
||||||
applyMaterial();
|
applyMaterial();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MaterialEntityItem::preDelete() {
|
|
||||||
EntityItem::preDelete();
|
|
||||||
removeMaterial();
|
|
||||||
}
|
|
||||||
|
|
||||||
void MaterialEntityItem::update(const quint64& now) {
|
void MaterialEntityItem::update(const quint64& now) {
|
||||||
if (_retryApply) {
|
if (_retryApply) {
|
||||||
applyMaterial();
|
applyMaterial();
|
||||||
|
|
|
@ -21,6 +21,7 @@ public:
|
||||||
static EntityItemPointer factory(const EntityItemID& entityID, const EntityItemProperties& properties);
|
static EntityItemPointer factory(const EntityItemID& entityID, const EntityItemProperties& properties);
|
||||||
|
|
||||||
MaterialEntityItem(const EntityItemID& entityItemID);
|
MaterialEntityItem(const EntityItemID& entityItemID);
|
||||||
|
~MaterialEntityItem();
|
||||||
|
|
||||||
ALLOW_INSTANTIATION // This class can be instantiated
|
ALLOW_INSTANTIATION // This class can be instantiated
|
||||||
|
|
||||||
|
@ -82,7 +83,6 @@ public:
|
||||||
void removeMaterial();
|
void removeMaterial();
|
||||||
|
|
||||||
void postParentFixup() override;
|
void postParentFixup() override;
|
||||||
void preDelete() override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// URL for this material. Currently, only JSON format is supported. Set to "userData" to use the user data to live edit a material.
|
// URL for this material. Currently, only JSON format is supported. Set to "userData" to use the user data to live edit a material.
|
||||||
|
|
Loading…
Reference in a new issue