mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-09-07 11:46:22 -04:00
[Cheat] Disable Wall Collision (#68)
* add no collision wall * Update ImguiUI.cpp * move to cheat --------- Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>
This commit is contained in:
@@ -2317,6 +2317,9 @@ void func_8002D268(Player* player, UNUSED Camera* camera, s8 screenId, s8 player
|
||||
player->pos[2] = nextZ;
|
||||
}
|
||||
player->pos[1] = nextY;
|
||||
if (CVarGetInteger("gNoWallColision", 0)) {
|
||||
player->pos[1] = nextY < CVarGetFloat("gMinHeight", 0.0f) ? CVarGetFloat("gMinHeight", 0.0f) : nextY;
|
||||
}
|
||||
if ((player->type & PLAYER_HUMAN) && (!(player->type & PLAYER_KART_AI))) {
|
||||
func_8002BB9C(player, &nextX, &nextZ, screenId, playerId, sp98);
|
||||
}
|
||||
|
||||
+21
-6
@@ -116,19 +116,22 @@ void DrawSettingsMenu() {
|
||||
// .format = "%.0f%%",
|
||||
// .isPercentage = true,
|
||||
// });
|
||||
// if (UIWidgets::CVarSliderFloat("Main Music Volume", "gMainMusicVolume", 0.0f, 1.0f, 1.0f, {
|
||||
// if (UIWidgets::CVarSliderFloat("Main Music Volume", "gMainMusicVolume", 0.0f, 1.0f, 1.0f,
|
||||
// {
|
||||
// .format = "%.0f%%",
|
||||
// .isPercentage = true,
|
||||
// })) {
|
||||
// audio_set_player_volume(SEQ_PLAYER_LEVEL, CVarGetFloat("gMainMusicVolume", 1.0f));
|
||||
// }
|
||||
// if (UIWidgets::CVarSliderFloat("Sound Effects Volume", "gSFXMusicVolume", 0.0f, 1.0f, 1.0f, {
|
||||
// if (UIWidgets::CVarSliderFloat("Sound Effects Volume", "gSFXMusicVolume",
|
||||
// 0.0f, 1.0f, 1.0f, {
|
||||
// .format = "%.0f%%",
|
||||
// .isPercentage = true,
|
||||
// })) {
|
||||
// audio_set_player_volume(SEQ_PLAYER_SFX, CVarGetFloat("gSFXMusicVolume", 1.0f));
|
||||
// }
|
||||
// if (UIWidgets::CVarSliderFloat("Environment Volume", "gEnvironmentVolume", 0.0f, 1.0f, 1.0f, {
|
||||
// if (UIWidgets::CVarSliderFloat("Environment Volume", "gEnvironmentVolume",
|
||||
// 0.0f, 1.0f, 1.0f, {
|
||||
// .format = "%.0f%%",
|
||||
// .isPercentage = true,
|
||||
// })) {
|
||||
@@ -295,7 +298,8 @@ void DrawSettingsMenu() {
|
||||
if (Ship::Context::GetInstance()->GetWindow()->GetWindowBackend() ==
|
||||
Ship::WindowBackend::FAST3D_DXGI_DX11) {
|
||||
UIWidgets::Tooltip(
|
||||
"Uses Matrix Interpolation to create extra frames, resulting in smoother graphics. This is purely "
|
||||
"Uses Matrix Interpolation to create extra frames, resulting in smoother graphics. "
|
||||
"This is purely "
|
||||
"visual and does not impact game logic, execution of glitches etc.\n\n"
|
||||
"A higher target FPS than your monitor's refresh rate will waste resources, and might give a worse "
|
||||
"result.");
|
||||
@@ -400,7 +404,8 @@ void DrawSettingsMenu() {
|
||||
void DrawMenuBarIcon() {
|
||||
static bool gameIconLoaded = false;
|
||||
if (!gameIconLoaded) {
|
||||
// Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTexture("Game_Icon", "textures/icons/gIcon.png");
|
||||
// Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadTexture("Game_Icon",
|
||||
// "textures/icons/gIcon.png");
|
||||
gameIconLoaded = false;
|
||||
}
|
||||
|
||||
@@ -451,6 +456,9 @@ void DrawEnhancementsMenu() {
|
||||
if (UIWidgets::BeginMenu("Enhancements")) {
|
||||
|
||||
if (UIWidgets::BeginMenu("Gameplay")) {
|
||||
UIWidgets::CVarCheckbox("No Level of Detail (LOD)", "gDisableLOD",
|
||||
{ .tooltip = "Disable Level of Detail (LOD) to avoid models using "
|
||||
"lower poly versions at a distance" });
|
||||
|
||||
|
||||
UIWidgets::WindowButton("Freecam", "gFreecam", GameUI::mFreecamWindow, {
|
||||
@@ -459,15 +467,18 @@ void DrawEnhancementsMenu() {
|
||||
UIWidgets::CVarCheckbox(
|
||||
"No Level of Detail (LOD)", "gDisableLod",
|
||||
{ .tooltip = "Disable Level of Detail (LOD) to avoid models using lower poly versions at a distance" });
|
||||
|
||||
UIWidgets::CVarCheckbox("Ignore Rendering Limits", "gIgnoreRenderDistance",
|
||||
{ .tooltip = "Renders game objects regardless of camera distance" });
|
||||
UIWidgets::CVarCheckbox("Select any star from menu", "gCompletedGame",
|
||||
{ .tooltip = "Unlocks extra mode and sets all gold cups." });
|
||||
|
||||
UIWidgets::CVarCheckbox("Disable Culling", "gNoCulling", { .tooltip = "Disable original culling of mk64" });
|
||||
UIWidgets::CVarSliderFloat(
|
||||
"Far Frustrum", "gFarFrustrum", 0.0f, 10000.0f, 10000.0f,
|
||||
{ .tooltip = "Say how Far the Frustrum are when 'Disable Culling' are enable", .step = 10.0f });
|
||||
ImGui::EndMenu();
|
||||
|
||||
}
|
||||
|
||||
ImGui::EndMenu();
|
||||
@@ -477,7 +488,11 @@ void DrawEnhancementsMenu() {
|
||||
void DrawCheatsMenu() {
|
||||
if (UIWidgets::BeginMenu("Cheats")) {
|
||||
UIWidgets::CVarCheckbox("Infinite Health", "gInfiniteHealth");
|
||||
UIWidgets::CVarCheckbox("Infinite Lives", "gInfiniteLives");
|
||||
UIWidgets::CVarCheckbox("Disable Wall Collision", "gNoWallColision", { .tooltip = "Disable wall collision." });
|
||||
UIWidgets::CVarSliderFloat(
|
||||
"Min Height", "gMinHeight", -50.0f, 50.0f, 0.0f,
|
||||
{ .tooltip = "When Disable Wall Collision are enable what is the minimal height you can get." });
|
||||
ImGui::EndMenu();
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
@@ -871,6 +871,9 @@ s32 is_colliding_with_drivable_surface(Collision* collision, f32 boundingBoxSize
|
||||
*/
|
||||
s32 is_colliding_with_wall2(Collision* arg, f32 boundingBoxSize, f32 x1, f32 y1, f32 z1, u16 surfaceIndex, f32 posX,
|
||||
f32 posY, f32 posZ) {
|
||||
if (CVarGetInteger("gNoWallColision", 0)) {
|
||||
return NO_COLLISION;
|
||||
}
|
||||
CollisionTriangle* triangle = &gCollisionMesh[surfaceIndex];
|
||||
UNUSED s32 pad[6];
|
||||
f32 x4;
|
||||
@@ -1053,6 +1056,9 @@ s32 is_colliding_with_wall2(Collision* arg, f32 boundingBoxSize, f32 x1, f32 y1,
|
||||
*/
|
||||
s32 is_colliding_with_wall1(Collision* arg, f32 boundingBoxSize, f32 x1, f32 y1, f32 z1, u16 surfaceIndex, f32 posX,
|
||||
f32 posY, f32 posZ) {
|
||||
if (CVarGetInteger("gNoWallColision", 0)) {
|
||||
return NO_COLLISION;
|
||||
}
|
||||
CollisionTriangle* triangle = &gCollisionMesh[surfaceIndex];
|
||||
s32 b = 1;
|
||||
UNUSED s32 pad[7];
|
||||
|
||||
Reference in New Issue
Block a user