Bugfix for AlwaysOnFixes.cpp as well as a fallback to prevent crashes when attempting to display an textId 0 (#7123)

Add guard to check if camera mode is CAMERA_MODE_FIRST_PERSON before applying fixes

Also adds missing PLAYER_IA modes for magic arrows, as well as applying camera fix for Hookshot outside of just lakeside lab.

Move gameinteractor for change aiming camera inside bow/sling/hook aiming block
This commit is contained in:
HighTierHumann
2026-08-27 15:35:25 -04:00
committed by GitHub
parent 1413ceb33d
commit 6d1a6527d4
2 changed files with 7 additions and 5 deletions
+5 -2
View File
@@ -130,7 +130,8 @@ void RegisterAlwaysOnFixes() {
s8* heldItemAction = va_arg(args, s8*);
s32* camMode = va_arg(args, s32*);
if (*heldItemAction == PLAYER_IA_BOW) {
if (*heldItemAction == PLAYER_IA_BOW || *heldItemAction == PLAYER_IA_BOW_FIRE ||
*heldItemAction == PLAYER_IA_BOW_ICE || *heldItemAction == PLAYER_IA_BOW_LIGHT) {
if (CVarGetInteger(CVAR_ENHANCEMENT("BowSlingshotAmmoFix"), false) ||
CVarGetInteger(CVAR_ENHANCEMENT("EquipmentAlwaysVisible"), false)) {
*camMode = CAM_MODE_AIM_ADULT;
@@ -141,7 +142,9 @@ void RegisterAlwaysOnFixes() {
*camMode = CAM_MODE_AIM_CHILD;
}
} else if (*heldItemAction == PLAYER_IA_HOOKSHOT || *heldItemAction == PLAYER_IA_LONGSHOT) {
if (gPlayState->sceneNum == SCENE_LAKESIDE_LABORATORY) {
if (CVarGetInteger(CVAR_ENHANCEMENT("EquipmentAlwaysVisible"), false)) {
*camMode = CAM_MODE_AIM_ADULT;
} else if (gPlayState->sceneNum == SCENE_LAKESIDE_LABORATORY) {
*camMode = CAM_MODE_AIM_ADULT; // Fix child Hookshot aiming in lab (CAM_MODE_AIM_CHILD is invalid there)
}
} else if (*heldItemAction == PLAYER_IA_BOOMERANG) {
@@ -5858,13 +5858,12 @@ s32 func_8083AD4C(PlayState* play, Player* this) {
} else {
camMode = CAM_MODE_AIM_BOOMERANG;
}
// Check if aiming camera mode should be overridden due to player settings
GameInteractor_Should(VB_CHANGE_AIMING_CAMERA, true, &this->heldItemAction, &camMode);
} else {
camMode = CAM_MODE_FIRST_PERSON;
}
// Check if aiming camera mode should be overridden due to player settings
GameInteractor_Should(VB_CHANGE_AIMING_CAMERA, true, &this->heldItemAction, &camMode);
return Camera_RequestMode(Play_GetCamera(play, CAM_ID_MAIN), camMode);
}