mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-08-19 14:13:40 -04:00
Fixed all possible ice trap scenarios
This commit is contained in:
@@ -1981,6 +1981,9 @@ s32 GiveItemWithoutActor(GlobalContext* globalCtx, s32 getItemId) {
|
||||
player->getItemId = getItemId;
|
||||
player->interactRangeActor = &player->actor;
|
||||
player->getItemDirection = player->actor.shape.rot.y;
|
||||
if (player->stateFlags1 & (PLAYER_STATE1_26)) {
|
||||
player->iceTrapped = 0;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,14 +99,14 @@ void func_80AFB768(EnSi* this, GlobalContext* globalCtx) {
|
||||
this->collider.base.ocFlags2 &= ~OC2_HIT_PLAYER;
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (getItemId == GI_ICE_TRAP) {
|
||||
GiveItemWithoutActor(globalCtx, getItemId);
|
||||
player->getItemId = GI_ICE_TRAP;
|
||||
player->iceTrapped = 1;
|
||||
textId = 0xF8;
|
||||
} else {
|
||||
textId = sGetItemTable[getItemId - 1].textId;
|
||||
giveItemId = sGetItemTable[getItemId - 1].itemId;
|
||||
}
|
||||
}
|
||||
if (getItemId != GI_ICE_TRAP) {
|
||||
} else {
|
||||
Item_Give(globalCtx, giveItemId);
|
||||
}
|
||||
if (CVar_GetS32("gSkulltulaFreeze", 0) != 1 || giveItemId != ITEM_SKULL_TOKEN) {
|
||||
@@ -134,14 +134,13 @@ void func_80AFB89C(EnSi* this, GlobalContext* globalCtx) {
|
||||
if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_13)) {
|
||||
if (gSaveContext.n64ddFlag) {
|
||||
if (getItemId == GI_ICE_TRAP) {
|
||||
GiveItemWithoutActor(globalCtx, getItemId);
|
||||
GiveItemWithoutActor(globalCtx, GI_ICE_TRAP);
|
||||
textId = 0xF8;
|
||||
} else {
|
||||
textId = sGetItemTable[getItemId - 1].textId;
|
||||
giveItemId = sGetItemTable[getItemId - 1].itemId;
|
||||
}
|
||||
}
|
||||
if (getItemId != GI_ICE_TRAP) {
|
||||
} else {
|
||||
Item_Give(globalCtx, giveItemId);
|
||||
}
|
||||
Message_StartTextbox(globalCtx, textId, NULL);
|
||||
|
||||
@@ -10977,6 +10977,10 @@ void Player_UpdateCommon(Player* this, GlobalContext* globalCtx, Input* input) {
|
||||
|
||||
Collider_ResetQuadAC(globalCtx, &this->shieldQuad.base);
|
||||
Collider_ResetQuadAT(globalCtx, &this->shieldQuad.base);
|
||||
|
||||
if (this->iceTrapped != 0) {
|
||||
GiveItemWithoutActor(globalCtx, GI_ICE_TRAP);
|
||||
}
|
||||
}
|
||||
|
||||
static Vec3f D_80854838 = { 0.0f, 0.0f, -30.0f };
|
||||
|
||||
Reference in New Issue
Block a user