Skip to content

Commit

Permalink
Timer does not start before the countdown on Next
Browse files Browse the repository at this point in the history
  • Loading branch information
GreepTheSheep committed Oct 5, 2021
1 parent 659d1f2 commit a8221d9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/TimerUI.as
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,12 @@ void loadFirstMapRMC(){
while (true){
yield();
CGamePlayground@ GamePlayground = cast<CGamePlayground>(GetApp().CurrentPlayground);
if (GamePlayground !is null){
#if MP4
CTrackManiaPlayer@ player = cast<CTrackManiaPlayer>(GamePlayground.GameTerminals[0].GUIPlayer);
#elif TMNEXT
CSmPlayer@ player = cast<CSmPlayer>(GamePlayground.GameTerminals[0].GUIPlayer);
#endif
if (GamePlayground !is null && player !is null){
goldCount = 0;
authorCount = 0;
survivalSkips = 0;
Expand All @@ -450,12 +455,11 @@ void loadFirstMapRMC(){
UI::ShowNotification("\\$080Random Map "+ changeEnumStyle(tostring(Setting_RMC_Mode)) + " started!", "Good Luck!");
displayTimer = true;
#if MP4
CTrackManiaPlayer@ player = cast<CTrackManiaPlayer>(GamePlayground.GameTerminals[0].GUIPlayer);
while (player.RaceState != CTrackManiaPlayer::ERaceState::Running){
yield();
}
#elif TMNEXT
while (GamePlayground.GameTerminals[0].UISequence_Current != CGameTerminal::ESGamePlaygroundUIConfig__EUISequence::Playing){
while (player.ScriptAPI.CurrentRaceTime < 0){
yield();
}
#endif
Expand Down

0 comments on commit a8221d9

Please sign in to comment.