diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ddaf24..cef1a1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [2.0.6] - 2024-04-26 + +### Fixed + +- Potential MacOS bug + ## [2.0.5] - 2024-04-19 ### Changed diff --git a/mod.json b/mod.json index 664d963..aac468d 100644 --- a/mod.json +++ b/mod.json @@ -1,11 +1,11 @@ { - "geode": "2.0.0-beta.24", + "geode": "2.0.0-beta.25", "gd": { "win": "2.204", "android": "2.205", "mac": "2.200" }, - "version": "v2.0.5", + "version": "v2.0.6", "id": "spaghettdev.gd-roulette", "name": "GD-Roulette", "developer": "SpaghettDev", diff --git a/src/layers/PlayLayer.cpp b/src/layers/PlayLayer.cpp index 3a6f6fa..fcf9afc 100644 --- a/src/layers/PlayLayer.cpp +++ b/src/layers/PlayLayer.cpp @@ -50,11 +50,14 @@ class $modify(PlayLayerPause, PlayLayer) void destroyPlayer(PlayerObject* player, GameObject* obj) { #ifdef GEODE_IS_MACOS + const float currentDelta = delta; + PlayLayer::destroyPlayer(player, obj); const int percentage = m_level->m_normalPercent; #else const int percentage = this->getCurrentPercentInt(); + const float currentDelta = delta; #endif // GEODE_IS_MACOS if ( g_rouletteManager.isPlaying && @@ -62,7 +65,7 @@ class $modify(PlayLayerPause, PlayLayer) !this->m_isPracticeMode && percentage >= g_rouletteManager.levelPercentageGoal ) { - if (delta > .2f/* && !this->m_player1->m_isDead*/) + if (currentDelta > .2f/* && !this->m_player1->m_isDead*/) { g_rouletteManager.hasFinishedPreviousLevel = true; g_rouletteManager.currentLevelPercentage = percentage; @@ -75,7 +78,9 @@ class $modify(PlayLayerPause, PlayLayer) m_fields->pauseGameAction = runningScene->runAction( CCSequence::create( - CCDelayTime::create(1.f), CCCallFunc::create(runningScene, callfunc_selector(PlayLayerPause::pause)), nullptr + CCDelayTime::create(1.f), + CCCallFunc::create(runningScene, callfunc_selector(PlayLayerPause::pause)), + nullptr ) ); }