Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion about.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Makes the Epic, Legendary and Mythic fires animated!
# Credits
- Uproxide
- Brift
- hiimjustin00 (Pretty Much rewrote it lmbao)
- hiimjasmine00 (Pretty Much rewrote it lmbao)
- ShineUA (Clipping Node on Level Cell)
- Cooper (help with sprite animations)

2 changes: 1 addition & 1 deletion mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"version": "v1.1.2",
"developers": [
"Uproxide",
"hiimjustin00",
"hiimjasmine00",
"Brift"
],
"description": "Makes the Epic, Legendary and Mythic fires animated!",
Expand Down
10 changes: 6 additions & 4 deletions src/hooks/LevelCell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ class $modify(MyLevelCell, LevelCell) {

if (!Loader::get()->isModLoaded("cdc.level_thumbnails")) return;

queueInMainThread([this, difficultyNode, difficultySpr, level] {
if (!getParent() || !typeinfo_cast<DailyLevelNode*>(getParent())) return;
auto hasCoins = level->m_coins > 0;
auto parent = getParent();
queueInMainThread([parent = Ref<CCNode>(parent), difficultyNode, difficultySpr, hasCoins] {
if (!typeinfo_cast<DailyLevelNode*>(parent.data())) return;

auto fireSprite = difficultyNode->getChildByID("animated-fire-sprite"_spr);
if (!fireSprite) {
Expand All @@ -40,15 +42,15 @@ class $modify(MyLevelCell, LevelCell) {
clippingNode->setPosition(fireSprite->getPosition());
clippingNode->setScale(fireSprite->getScale());

if (auto bgNode = static_cast<CCScale9Sprite*>(getParent()->getChildByID("background"))) {
if (auto bgNode = parent->getChildByID("background")) {
clippingNode->setStencil(CCLayerColor::create(
{0, 0, 0, 255},
fireSprite->getContentWidth(),
fireSprite->getContentHeight() / 2
+ bgNode->getContentHeight()
- difficultyNode->getPositionY()
- clippingNode->getPositionY()
- 6.0f - (level->m_coins > 0 ? 9.0f : 0.0f)
- 6.0f - (hasCoins > 0 ? 9.0f : 0.0f)
));
}

Expand Down