From bc72f251ed6d519a58174cd33552dac9383613ac Mon Sep 17 00:00:00 2001 From: Garrett Cox Date: Wed, 17 Jan 2024 17:56:41 +0000 Subject: [PATCH] Add noclip cheat (#39) --- mm/src/code/z_bgcheck.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mm/src/code/z_bgcheck.c b/mm/src/code/z_bgcheck.c index 7b8802b35..ba958a77a 100644 --- a/mm/src/code/z_bgcheck.c +++ b/mm/src/code/z_bgcheck.c @@ -4,6 +4,7 @@ #include "fixed_point.h" #include "vt.h" #include "overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h" +#include "libultraship/libultraship.h" #include #define DYNA_RAYCAST_FLOORS 1 @@ -1912,6 +1913,10 @@ s32 BgCheck_CheckWallImpl(CollisionContext* colCtx, u16 xpFlags, Vec3f* posResul dy = posNext->y - posPrev->y; dz = posNext->z - posPrev->z; + if (CVarGetInteger("gDeveloperTools.NoClip", 0) && actor != NULL && actor->id == ACTOR_PLAYER) { + return false; + } + // if there's movement on the xz plane, and argA flag is 0, if (((dx != 0.0f) || (dz != 0.0f)) && !(argA & 1)) { if ((checkHeight + dy) < 5.0f) {