Adds the Keese and Guay don't target you cheat (#3267)

* Adds the Keese and Guay don't target you cheat
that makes keese and guay ignore you as if
you are wearing the skull mask

* changed instances of CVar_GetS32 to CVarGetInteger
added the cvar to presets.h

---------

Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
This commit is contained in:
DeusVexus 2024-02-15 18:29:09 -08:00 committed by GitHub
parent 457a75e9f8
commit 4797c9ad35
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 11 additions and 4 deletions

View File

@ -312,6 +312,7 @@ const std::vector<const char*> cheatCvars = {
"gSwitchAge", "gSwitchAge",
"gSwitchTimeline", "gSwitchTimeline",
"gNoRedeadFreeze", "gNoRedeadFreeze",
"gNoKeeseGuayTarget",
"gBombTimerMultiplier", "gBombTimerMultiplier",
"gNoFishDespawn", "gNoFishDespawn",
"gNoBugsDespawn", "gNoBugsDespawn",

View File

@ -1545,6 +1545,8 @@ void DrawCheatsMenu() {
UIWidgets::Tooltip("This syncs the ingame time with the real world time"); UIWidgets::Tooltip("This syncs the ingame time with the real world time");
UIWidgets::PaddedEnhancementCheckbox("No ReDead/Gibdo Freeze", "gNoRedeadFreeze", true, false); UIWidgets::PaddedEnhancementCheckbox("No ReDead/Gibdo Freeze", "gNoRedeadFreeze", true, false);
UIWidgets::Tooltip("Prevents ReDeads and Gibdos from being able to freeze you with their scream"); UIWidgets::Tooltip("Prevents ReDeads and Gibdos from being able to freeze you with their scream");
UIWidgets::PaddedEnhancementCheckbox("Keese/Guay don't target you", "gNoKeeseGuayTarget", true, false);
UIWidgets::Tooltip("Keese and Guay no longer target you and simply ignore you as if you were wearing the skull mask");
{ {
static int32_t betaQuestEnabled = CVarGetInteger("gEnableBetaQuest", 0); static int32_t betaQuestEnabled = CVarGetInteger("gEnableBetaQuest", 0);
static int32_t lastBetaQuestEnabled = betaQuestEnabled; static int32_t lastBetaQuestEnabled = betaQuestEnabled;

View File

@ -282,7 +282,8 @@ void EnCrow_FlyIdle(EnCrow* this, PlayState* play) {
this->timer--; this->timer--;
} }
if ((this->timer == 0) && (this->actor.xzDistToPlayer < 300.0f) && !(player->stateFlags1 & PLAYER_STATE1_ON_HORSE) && if ((this->timer == 0) && (this->actor.xzDistToPlayer < 300.0f) && !(player->stateFlags1 & PLAYER_STATE1_ON_HORSE) &&
(this->actor.yDistToWater < -40.0f) && (Player_GetMask(play) != PLAYER_MASK_SKULL)) { (this->actor.yDistToWater < -40.0f) && (Player_GetMask(play) != PLAYER_MASK_SKULL) &&
!CVarGetInteger("gNoKeeseGuayTarget", 0)) {
EnCrow_SetupDiveAttack(this); EnCrow_SetupDiveAttack(this);
} }
} }
@ -319,7 +320,8 @@ void EnCrow_DiveAttack(EnCrow* this, PlayState* play) {
if ((this->timer == 0) || (Player_GetMask(play) == PLAYER_MASK_SKULL) || if ((this->timer == 0) || (Player_GetMask(play) == PLAYER_MASK_SKULL) ||
(this->collider.base.atFlags & AT_HIT) || (this->actor.bgCheckFlags & 9) || (this->collider.base.atFlags & AT_HIT) || (this->actor.bgCheckFlags & 9) ||
(player->stateFlags1 & PLAYER_STATE1_ON_HORSE) || (this->actor.yDistToWater > -40.0f)) { (player->stateFlags1 & PLAYER_STATE1_ON_HORSE) || (this->actor.yDistToWater > -40.0f) ||
CVarGetInteger("gNoKeeseGuayTarget", 0)) {
if (this->collider.base.atFlags & AT_HIT) { if (this->collider.base.atFlags & AT_HIT) {
this->collider.base.atFlags &= ~AT_HIT; this->collider.base.atFlags &= ~AT_HIT;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_KAICHO_ATTACK); Audio_PlayActorSound2(&this->actor, NA_SE_EN_KAICHO_ATTACK);

View File

@ -415,7 +415,8 @@ void EnFirefly_FlyIdle(EnFirefly* this, PlayState* play) {
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.wallYaw, 2, 0xC00, 0x300); Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.wallYaw, 2, 0xC00, 0x300);
} }
if ((this->timer == 0) && (this->actor.xzDistToPlayer < 200.0f) && if ((this->timer == 0) && (this->actor.xzDistToPlayer < 200.0f) &&
(Player_GetMask(play) != PLAYER_MASK_SKULL)) { (Player_GetMask(play) != PLAYER_MASK_SKULL) &&
!CVarGetInteger("gNoKeeseGuayTarget", 0)) {
EnFirefly_SetupDiveAttack(this); EnFirefly_SetupDiveAttack(this);
} }
} }
@ -493,7 +494,8 @@ void EnFirefly_DiveAttack(EnFirefly* this, PlayState* play) {
} }
Math_ScaledStepToS(&this->actor.shape.rot.x, this->targetPitch, 0x100); Math_ScaledStepToS(&this->actor.shape.rot.x, this->targetPitch, 0x100);
} }
if ((this->timer == 0) || (Player_GetMask(play) == PLAYER_MASK_SKULL)) { if ((this->timer == 0) || (Player_GetMask(play) == PLAYER_MASK_SKULL) ||
CVarGetInteger("gNoKeeseGuayTarget", 0)) {
EnFirefly_SetupFlyAway(this); EnFirefly_SetupFlyAway(this);
} }
} }