Skip to content

Commit

Permalink
Merge pull request HarbourMasters#100 from MelonSpeedruns/testing-out…
Browse files Browse the repository at this point in the history
…-item-replacement

items are always animated when by NPCs now
  • Loading branch information
briaguya-ai authored Jun 9, 2022
2 parents e02ea79 + b89d9c5 commit 1a652c1
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions soh/src/overlays/actors/ovl_player_actor/z_player.c
Original file line number Diff line number Diff line change
Expand Up @@ -6196,7 +6196,18 @@ s32 func_8083E5A8(Player* this, GlobalContext* globalCtx) {
return;
}

if ((Item_CheckObtainability(giEntry->itemId) == ITEM_NONE) || (globalCtx->sceneNum == SCENE_BOWLING)) {
if ((Item_CheckObtainability(giEntry->itemId) == ITEM_NONE) || (globalCtx->sceneNum == SCENE_BOWLING) ||
gSaveContext.n64ddFlag) {

if (gSaveContext.n64ddFlag &&
((interactedActor->id == ACTOR_EN_ITEM00 &&
(interactedActor->params != 6 && interactedActor->params != 17)) ||
(interactedActor->id == ACTOR_EN_KAREBABA || interactedActor->id == ACTOR_EN_DEKUBABA))) {
func_8083E4C4(globalCtx, this, giEntry);
this->getItemId = GI_NONE;
return 0;
}

func_808323B4(globalCtx, this);
func_8083AE40(this, giEntry->objectId);

Expand All @@ -6214,13 +6225,12 @@ s32 func_8083E5A8(Player* this, GlobalContext* globalCtx) {
func_8083E4C4(globalCtx, this, giEntry);
this->getItemId = GI_NONE;
}
}
else if (CHECK_BTN_ALL(sControlInput->press.button, BTN_A) && !(this->stateFlags1 & PLAYER_STATE1_11) &&
!(this->stateFlags2 & PLAYER_STATE2_10)) {
} else if (CHECK_BTN_ALL(sControlInput->press.button, BTN_A) && !(this->stateFlags1 & PLAYER_STATE1_11) &&
!(this->stateFlags2 & PLAYER_STATE2_10)) {
if (this->getItemId != GI_NONE) {
GetItemEntry* giEntry = &sGetItemTable[-this->getItemId - 1];
EnBox* chest = (EnBox*)interactedActor;
if(CVar_GetS32("gFastChests", 0) != 0) {
if (CVar_GetS32("gFastChests", 0) != 0) {
giEntry->gi = -1 * abs(giEntry->gi);
}

Expand Down Expand Up @@ -6248,8 +6258,7 @@ s32 func_8083E5A8(Player* this, GlobalContext* globalCtx) {
func_80832F54(globalCtx, this, 0x28F);
chest->unk_1F4 = 1;
Camera_ChangeSetting(Gameplay_GetCamera(globalCtx, 0), CAM_SET_SLOW_CHEST_CS);
}
else {
} else {
func_80832264(globalCtx, this, &gPlayerAnim_002DF8);
chest->unk_1F4 = -1;
}
Expand All @@ -6269,12 +6278,10 @@ s32 func_8083E5A8(Player* this, GlobalContext* globalCtx) {
if (sp24 == PLAYER_AP_SWORD_MASTER) {
this->nextModelGroup = Player_ActionToModelGroup(this, PLAYER_AP_LAST_USED);
func_8083399C(globalCtx, this, PLAYER_AP_LAST_USED);
}
else {
} else {
func_80835F44(globalCtx, this, ITEM_LAST_USED);
}
}
else {
} else {
s32 strength = Player_GetStrength();

if ((interactedActor->id == ACTOR_EN_ISHI) && ((interactedActor->params & 0xF) == 1) &&
Expand Down

0 comments on commit 1a652c1

Please sign in to comment.