Fix roulette sound bug

This commit is contained in:
mateusfavarin 2024-07-01 00:29:14 -03:00
parent d0b5aaa42d
commit bc7a76f447
3 changed files with 23 additions and 12 deletions

View File

@ -1,6 +1,20 @@
#ifdef USE_ONLINE
#include "OnlineCTR/names3d.c"
#include "OnlineCTR/endOfRaceUI_Camera.c"
typedef void (*VehicleFuncPtr)(struct Thread* thread, struct Driver* driver);
void RunVehicleThread(VehicleFuncPtr func, struct Thread* thread, struct Driver* driver)
{
bool restore = false;
if ((sdata->gGT->gameMode1 & END_OF_RACE) && !checkpointTracker[driver->driverID].raceFinished)
{
sdata->gGT->gameMode1 &= ~(END_OF_RACE);
restore = true;
}
func(thread, driver);
if (restore) { sdata->gGT->gameMode1 |= END_OF_RACE; }
}
#endif
#ifdef USE_BOOSTBAR

View File

@ -1,10 +1,13 @@
#include <common.h>
#ifdef USE_ONLINE
#include "../AltMods/OnlineCTR/global.h"
#endif
typedef void (*VehicleFuncPtr)(struct Thread* thread, struct Driver* driver);
#ifdef USE_ONLINE
#include "../AltMods/OnlineCTR/global.h"
void RunVehicleThread(VehicleFuncPtr func, struct Thread* thread, struct Driver* driver);
extern CheckpointTracker checkpointTracker[MAX_NUM_PLAYERS];
#endif
void DECOMP_MainFrame_GameLogic(struct GameTracker* gGT, struct GamepadSystem* gGamepads)
{
char bVar1;
@ -232,15 +235,9 @@ LAB_80035098:
if (pcVar5 != 0)
{
#ifdef USE_ONLINE
int gameModeBackup = gGT->gameMode1;
if (!checkpointTracker[psVar9->driverID].raceFinished)
{
gGT->gameMode1 &= ~(END_OF_RACE);
}
#endif
RunVehicleThread(pcVar5, psVar12, psVar9);
#else
pcVar5(psVar12, psVar9);
#ifdef USE_ONLINE
gGT->gameMode1 = gameModeBackup;
#endif
}

View File

@ -16,7 +16,7 @@
//#define USE_BIGQUEUE // Requires RAMEX: Extended loading queue
//#define USE_HIGH1P // Requires BIGQUEUE: All high model drivers
//#define USE_RANDOM // Requires HIGH1P: Character Randomizer
#define USE_ONLINE // Requires HIGH1P: Online Multiplayer
//#define USE_ONLINE // Requires HIGH1P: Online Multiplayer
//#define USE_HIGHMP // Requires RAMEX: Multiplayer Maxed mod
//#define USE_VR // Virtual Reality