diff options
| author | MegaMech <MegaMech@users.noreply.github.com> | 2025-12-07 21:00:06 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-07 21:00:06 -0700 |
| commit | dbae0c3aca33a022e8c1d511fe521407375057b2 (patch) | |
| tree | 889ebe9e5c03261d92304545c5beae13892831f2 /src/engine/RaceManager.cpp | |
| parent | 04ca19a9757752676450364e998d6af0d90e73ef (diff) | |
Name ScreenContext, Refactor Course class to Track (#583)
* Rename Screen Contexts
* typedef ScreenContext struct
* Fix Compile
* Rename Course.cpp to Track.cpp
* Refactor Course to Track
* A few renames
* General Cleanup
* More Rename
* More names
* Move TrackSections struct to Track.h
---------
Co-authored-by: MegaMech <7255464+MegaMech@users.noreply.github.com>
Diffstat (limited to 'src/engine/RaceManager.cpp')
| -rw-r--r-- | src/engine/RaceManager.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/engine/RaceManager.cpp b/src/engine/RaceManager.cpp index 851c25375..d59f875a8 100644 --- a/src/engine/RaceManager.cpp +++ b/src/engine/RaceManager.cpp @@ -52,15 +52,15 @@ extern "C" void add_triangle_to_collision_mesh(Vtx* vtx1, Vtx* vtx2, Vtx* vtx3, } void RaceManager::Load() { - if (WorldContext.GetCurrentCourse()) { + if (WorldContext.GetTrack()) { mirroredVtxCache.clear(); - WorldContext.GetCurrentCourse()->Load(); + WorldContext.GetTrack()->Load(); } } void RaceManager::UnLoad() { - if (WorldContext.GetCurrentCourse()) { - WorldContext.GetCurrentCourse()->UnLoad(); + if (WorldContext.GetTrack()) { + WorldContext.GetTrack()->UnLoad(); } } @@ -74,14 +74,14 @@ void RaceManager::PreInit() { } void RaceManager::BeginPlay() { - auto course = WorldContext.GetCurrentCourse(); + auto track = WorldContext.GetTrack(); - if (course) { + if (track) { // Do not spawn finishline in credits or battle mode. And if bSpawnFinishline. if ((gGamestate != CREDITS_SEQUENCE) && (gModeSelection != BATTLE)) { - if (course->bSpawnFinishline) { - if (course->FinishlineSpawnPoint.has_value()) { - AFinishline::Spawn(course->FinishlineSpawnPoint.value(), IRotator(0, 0, 0)); + if (track->bSpawnFinishline) { + if (track->FinishlineSpawnPoint.has_value()) { + AFinishline::Spawn(track->FinishlineSpawnPoint.value(), IRotator(0, 0, 0)); } else { AFinishline::Spawn(); } @@ -90,7 +90,7 @@ void RaceManager::BeginPlay() { } gEditor.AddLight("Sun", nullptr, D_800DC610[1].l->l.dir); - course->BeginPlay(); + track->BeginPlay(); } } |
