mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-06-03 10:32:19 -04:00
Some fixes for battle mode
This commit is contained in:
@@ -79,6 +79,10 @@ u32 World::PreviousCup() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void World::SetCupIndex(size_t index) {
|
||||
CupIndex = index;
|
||||
}
|
||||
|
||||
void World::SetCup(Cup* cup) {
|
||||
if (cup) {
|
||||
CurrentCup = cup;
|
||||
|
||||
@@ -82,6 +82,7 @@ public:
|
||||
|
||||
void AddCup(Cup*);
|
||||
void SetCup(Cup* cup);
|
||||
void SetCupIndex(size_t index);
|
||||
const char* GetCupName();
|
||||
u32 GetCupIndex();
|
||||
u32 NextCup();
|
||||
|
||||
@@ -2005,6 +2005,7 @@ void load_menu_states(s32 menuSelection) {
|
||||
CM_SetCup(GetBattleCup());
|
||||
// gCupSelection = BATTLE_CUP;
|
||||
D_800DC540 = 4;
|
||||
CM_SetCupIndex(BATTLE_CUP);
|
||||
gSubMenuSelection = SUB_MENU_MAP_SELECT_BATTLE_COURSE;
|
||||
} else {
|
||||
if (GetCup() == GetBattleCup()) {
|
||||
|
||||
+8
-3
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user