Skip to content

Commit 2053804

Browse files
committed
zilko added node IDs yayyy
1 parent 9b2c107 commit 2053804

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/PlayLayer.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,10 @@ class $modify(MyPlayLayer, PlayLayer) {
150150
bool isFromZilkoMod = false;
151151
const bool isNewBest = MyPlayLayer::didPlayerDieAtNewBest();
152152

153-
if (CCNode* deathAnim = this->getChildByID("zilko.death_animations/death-animation")) {
154-
if (deathAnim->getChildByType<CCLayerColor*>(0)) {
155-
if (CurrencyRewardLayer* crl = deathAnim->getChildByType<CurrencyRewardLayer*>(0); crl && getModBool("currencyLayer")) crl->setVisible(false);
156-
newBestNodeProbably = static_cast<CCNode*>(deathAnim->getChildren()->objectAtIndex(1));
157-
isFromZilkoMod = true;
158-
}
153+
if (CCNode* deathAnim = this->getChildByID("zilko.death_animations/death-animation"); deathAnim && deathAnim->getTag() == 23) {
154+
if (CCNode* crl = deathAnim->getChildByID("reward-layer"); crl && getModBool("currencyLayer")) crl->setVisible(false);
155+
newBestNodeProbably = deathAnim->getChildByID("container");
156+
isFromZilkoMod = true;
159157
}
160158
for (int i = static_cast<int>(getChildrenCount() - 1); i >= 0; i--) {
161159
// NEW [good]: int i = getChildrenCount() - 1; i >= 0; i--

0 commit comments

Comments
 (0)