mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-08-31 10:01:02 -04:00
Impl Sky and SkyActors (#630)
* Create Cloud.cpp * Create Cloud.h * Fix the cloud * Cleanup * More cleanup * Update Track.h * Refactor SkyboxCloud position calculations * Update SkyboxStar.cpp * Update SkyboxStar.cpp * Refactor SkyboxStar.cpp by removing redundant code * Update SkyboxCloud.cpp * Refactor SkyboxSnow.cpp by reordering includes * Update SkyboxCloud.h * Refactor SkyboxStar.h for improved formatting * Impl skyboxcloud * Update comment * update comment * Work now * Fully impl Sky * Fix define * Fix args
This commit is contained in:
@@ -21,6 +21,9 @@ public:
|
||||
|
||||
TrackBrowser(const Registry<TrackInfo>& registry) {
|
||||
mTracks = registry.GetAllInfo();
|
||||
|
||||
RemovePodiumCeremony();
|
||||
|
||||
std::sort(mTracks.begin(), mTracks.end(), [](const TrackInfo* a, const TrackInfo* b) {
|
||||
return a->Id < b->Id;
|
||||
});
|
||||
@@ -32,6 +35,9 @@ public:
|
||||
void Refresh(const Registry<TrackInfo>& registry) {
|
||||
mTracks.clear();
|
||||
mTracks = registry.GetAllInfo();
|
||||
|
||||
RemovePodiumCeremony();
|
||||
|
||||
std::sort(mTracks.begin(), mTracks.end(), [](const TrackInfo* a, const TrackInfo* b) {
|
||||
return a->Id < b->Id;
|
||||
});
|
||||
@@ -42,6 +48,17 @@ public:
|
||||
mTrackIndex = 0;
|
||||
}
|
||||
|
||||
// Podium is not a valid user selectable option in the menus, remove it.
|
||||
void RemovePodiumCeremony() {
|
||||
mTracks.erase(
|
||||
std::remove_if(mTracks.begin(), mTracks.end(),
|
||||
[](const TrackInfo* track) {
|
||||
return track && track->ResourceName == "mk:podium_ceremony";
|
||||
}),
|
||||
mTracks.end()
|
||||
);
|
||||
}
|
||||
|
||||
void SetTrack(std::string name) {
|
||||
if (gTrackRegistry.Find(name)) {
|
||||
gTrackRegistry.Invoke(name);
|
||||
|
||||
Reference in New Issue
Block a user