@@ -32,24 +32,6 @@ class $modify(PlayLayerPause, PlayLayer)
3232 CCDirector::sharedDirector ()->getRunningScene ()->stopAction (m_fields->pauseGameAction );
3333 }
3434
35- // thank you alk <3
36- float currentPercent ()
37- {
38- float percent;
39-
40- if (m_level->m_timestamp > 0 )
41- percent = static_cast <float >(m_gameState.m_unk1f8 ) / m_level->m_timestamp * 100 .f ;
42- else
43- percent = m_player1->getPosition ().x / m_levelLength * 100 .f ;
44-
45- if (percent >= 100 .f )
46- return 100 .f ;
47- else if (percent <= 0 .f )
48- return 0 .f ;
49- else
50- return percent;
51- }
52-
5335 bool init (GJGameLevel* level, bool p1, bool p2)
5436 {
5537 delta = .0f ;
@@ -68,8 +50,14 @@ class $modify(PlayLayerPause, PlayLayer)
6850
6951 void destroyPlayer (PlayerObject* player, GameObject* obj)
7052 {
53+ #ifdef GEODE_IS_MACOS
54+ PlayLayer::destroyPlayer (player, obj);
55+
56+ const int percentage = m_level->m_normalPercent ;
57+ #else
58+ const int percentage = this ->getCurrentPercentInt ();
59+ #endif // GEODE_IS_MACOS
7160 if (
72- const int percentage = static_cast <int >(currentPercent ());
7361 g_rouletteManager.isPlaying &&
7462 this ->m_level ->m_levelID == g_rouletteManager.currentLevelID &&
7563 !this ->m_isPracticeMode &&
@@ -95,7 +83,9 @@ class $modify(PlayLayerPause, PlayLayer)
9583 }
9684 }
9785
86+ #ifndef GEODE_IS_MACOS
9887 PlayLayer::destroyPlayer (player, obj);
88+ #endif // !GEODE_IS_MACOS
9989 }
10090
10191 void levelComplete ()
0 commit comments