diff options
| author | MegaMech <7255464+MegaMech@users.noreply.github.com> | 2025-05-22 07:04:45 -0600 |
|---|---|---|
| committer | MegaMech <7255464+MegaMech@users.noreply.github.com> | 2025-05-22 07:04:45 -0600 |
| commit | 6ff80c5f08c0a9c4e57ec419d4e6dcd781bb5b45 (patch) | |
| tree | 67b2887e882cdd3b056fd10859634be4e3e60f27 /src/port | |
| parent | 20b67182c4fdcb46792fd92197159c3000b64c7b (diff) | |
Some fixes for battle mode
Diffstat (limited to 'src/port')
| -rw-r--r-- | src/port/Game.cpp | 11 | ||||
| -rw-r--r-- | src/port/Game.h | 2 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/port/Game.cpp b/src/port/Game.cpp index 2c0ec3a0a..33b4e9d16 100644 --- a/src/port/Game.cpp +++ b/src/port/Game.cpp @@ -244,6 +244,10 @@ u32 GetCupIndex(void) { return gWorldInstance.GetCupIndex(); } +void CM_SetCupIndex(size_t index) { + gWorldInstance.SetCupIndex(index); +} + const char* GetCupName(void) { return gWorldInstance.CurrentCup->Name; } @@ -394,10 +398,11 @@ void CM_BeginPlay() { if (course) { // Do not spawn finishline in credits or battle mode. And if bSpawnFinishline. - if ((gGamestate != CREDITS_SEQUENCE) && (gGamestate != BATTLE) && (course->bSpawnFinishline)) { - gWorldInstance.AddActor(new AFinishline(course->FinishlineSpawnPoint)); + if ((gGamestate != CREDITS_SEQUENCE) && (gModeSelection != BATTLE)) { + if (course->bSpawnFinishline) { + gWorldInstance.AddActor(new AFinishline(course->FinishlineSpawnPoint)); + } } - gEditor.AddLight("Sun", nullptr, D_800DC610[1].l->l.dir); course->BeginPlay(); diff --git a/src/port/Game.h b/src/port/Game.h index 2102cb7ea..2731372ca 100644 --- a/src/port/Game.h +++ b/src/port/Game.h @@ -51,6 +51,8 @@ void PreviousCourse(); void CM_SetCup(void*); +void CM_SetCupIndex(size_t index); + void CM_LoadTextures(); void CM_RenderCourse(struct UnkStruct_800DC5EC* arg0); |
