Skip to content
This repository was archived by the owner on Aug 2, 2026. It is now read-only.

Commit 209cc17

Browse files
committed
Small fix
1 parent 3676774 commit 209cc17

5 files changed

Lines changed: 14 additions & 5 deletions

File tree

changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 2.0.23
2+
- Fix a small oversight that could break transitions
3+
14
# 2.0.21 & 2.0.22
25
- Attempt to fix a rare crash
36

mod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"mac": "2.2074",
77
"ios": "2.2074"
88
},
9-
"version": "v2.0.22",
9+
"version": "v2.0.23",
1010
"id": "alphalaneous.happy_textures",
1111
"name": "Happy Textures :3",
1212
"developer": "Alphalaneous",

src/NodeModding.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ class $modify(HTCCObject, CCObject) {
4040
MyCCNode* node = reinterpret_cast<MyCCNode*>(this);
4141

4242
auto fields = node->m_fields.self();
43+
fields->m_self = node;
44+
4345
if (!fields->m_modified) {
4446
modding->setNodeVTable(node);
4547
LateQueue::get()->queue(node, [modding, node = Ref(node), fields] {

src/UIModding.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1614,9 +1614,7 @@ void UIModding::doUICheckForType(std::string_view type, CCNode* node) {
16141614
}
16151615

16161616
bool UIModding::checkNodeValidity(CCObject* node) {
1617-
auto ret = *(uintptr_t*)node == m_nodeVTables[node];
1618-
m_nodeVTables.erase(node);
1619-
return ret;
1617+
return *(uintptr_t*)node == m_nodeVTables[node];
16201618
}
16211619

16221620
void UIModding::setNodeVTable(CCNode* node) {

src/nodes/CCNode.hpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ class $modify(MyCCNode, CCNode) {
1313
std::vector<matjson::Value> m_attributes;
1414
std::vector<CCAction*> m_scheduledAttributes;
1515
bool m_modified = false;
16+
CCNode* m_self;
1617
std::string m_baseID = "";
18+
~Fields() {
19+
UIModding::get()->m_nodeVTables.erase(m_self);
20+
}
1721
};
1822

1923
void setBaseID(const std::string& ID) {
@@ -64,6 +68,8 @@ class $modify(MyCCNode, CCNode) {
6468
}
6569

6670
void setModified() {
67-
m_fields->m_modified = true;
71+
auto fields = m_fields.self();
72+
fields->m_self = this;
73+
fields->m_modified = true;
6874
}
6975
};

0 commit comments

Comments
 (0)