[Tweak] Better GS Ice Trap Collection Handling (#3077)

* Make ice traps kick the player out of first person when collecting with the hookshot.

* Forgot the `extern`s XD
This commit is contained in:
Malkierian 2023-09-10 10:54:18 -07:00 committed by GitHub
parent 023654f617
commit 79b5301165
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,6 +6,9 @@
#include "z_en_si.h"
extern void func_8083C148(Player*, PlayState*);
extern void func_80078884(uint16_t);
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_HOOKSHOT_DRAGS)
void EnSi_Init(Actor* thisx, PlayState* play);
@ -181,6 +184,12 @@ void func_80AFB950(EnSi* this, PlayState* play) {
} else {
SET_GS_FLAGS((this->actor.params & 0x1F00) >> 8, this->actor.params & 0xFF);
Actor_Kill(&this->actor);
if (gSaveContext.pendingIceTrapCount > 0 && player->heldItemId == 11) {
player->actor.freezeTimer = 0;
func_8083C148(GET_PLAYER(play), play);
func_80078884(NA_SE_SY_CAMERA_ZOOM_UP);
player->currentYaw = player->actor.shape.rot.y;
}
}
}