mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-09-02 18:32:49 -04:00
* Divide by zero fix & cup restart behavior fix * CI Test * Fix a divide by zero bug. Fix for cups when using the reset button * Added defines, renamed function --------- Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>
This commit is contained in:
+9
-5
@@ -144,12 +144,8 @@ void CustomEngineInit() {
|
||||
gWorldInstance.AddCup(gSpecialCup);
|
||||
gWorldInstance.AddCup(gBattleCup);
|
||||
|
||||
/* Set default course; mario raceway */
|
||||
//SelectMarioRaceway(); // This results in a nullptr
|
||||
gWorldInstance.CurrentCourse = mario;
|
||||
gWorldInstance.CurrentCup = gMushroomCup;
|
||||
gWorldInstance.CurrentCup->CursorPosition = 3;
|
||||
gWorldInstance.CupIndex = 0;
|
||||
SetMarioRaceway();
|
||||
|
||||
// ModelLoader::LoadModelList bowserStatueList = {
|
||||
// .course = gBowsersCastle,
|
||||
@@ -198,6 +194,14 @@ void CM_SpawnFromLevelProps() {
|
||||
// Editor::SpawnFromLevelProps();
|
||||
}
|
||||
|
||||
// Set default course; mario raceway
|
||||
void SetMarioRaceway(void) {
|
||||
SetCourseById(0);
|
||||
gWorldInstance.CurrentCup = gMushroomCup;
|
||||
gWorldInstance.CurrentCup->CursorPosition = 3;
|
||||
gWorldInstance.CupIndex = 0;
|
||||
}
|
||||
|
||||
World* GetWorld(void) {
|
||||
return &gWorldInstance;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user