mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-08-18 14:02:48 -04:00
Fix freecam for custom courses
This commit is contained in:
@@ -239,6 +239,10 @@ void Course::Collision() {}
|
||||
void Course::ScrollingTextures() {}
|
||||
void Course::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection) {}
|
||||
|
||||
void Course::Destroy() { }
|
||||
void Course::Destroy() {}
|
||||
|
||||
bool Course::IsMod() {
|
||||
return false;
|
||||
}
|
||||
|
||||
Course* currentCourse = nullptr;
|
||||
|
||||
@@ -114,6 +114,7 @@ public:
|
||||
virtual void ScrollingTextures();
|
||||
virtual void DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection);
|
||||
virtual void Destroy();
|
||||
virtual bool IsMod();
|
||||
private:
|
||||
void Init();
|
||||
};
|
||||
|
||||
@@ -340,3 +340,7 @@ void TestCourse::RenderCredits() {
|
||||
void TestCourse::Collision() {}
|
||||
|
||||
void TestCourse::Destroy() { }
|
||||
|
||||
bool TestCourse::IsMod() {
|
||||
return true;
|
||||
}
|
||||
@@ -39,4 +39,5 @@ public:
|
||||
virtual void SpawnVehicles() override;
|
||||
virtual void UpdateVehicles() override;
|
||||
virtual void Destroy() override;
|
||||
virtual bool IsMod() override;
|
||||
};
|
||||
|
||||
@@ -41,6 +41,7 @@ extern "C" {
|
||||
#include "audio/load.h"
|
||||
#include "audio/external.h"
|
||||
#include "networking/networking.h"
|
||||
#include "render_courses.h"
|
||||
//#include "engine/wasm.h"
|
||||
}
|
||||
|
||||
@@ -340,6 +341,14 @@ extern "C" {
|
||||
}
|
||||
|
||||
void CourseManager_RenderCourse(struct UnkStruct_800DC5EC* arg0) {
|
||||
if (gWorldInstance.CurrentCourse->IsMod() == false) {
|
||||
if ((CVarGetInteger("gFreecam", 0) == true)) {
|
||||
// Render credits courses
|
||||
func_8029569C();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (gWorldInstance.CurrentCourse) {
|
||||
gWorldInstance.CurrentCourse->Render(arg0);
|
||||
}
|
||||
|
||||
@@ -1399,12 +1399,6 @@ void render_course(struct UnkStruct_800DC5EC* arg0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((CVarGetInteger("gFreecam", 0) == true)) {
|
||||
// Render credits courses
|
||||
func_8029569C();
|
||||
return;
|
||||
}
|
||||
|
||||
if (creditsRenderMode) {
|
||||
func_8029569C();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user