fix fakematch in LinkHoldingItem_Action3

This commit is contained in:
theo3
2023-12-28 17:48:05 -08:00
parent b32553e490
commit 7c1c612c9b
21 changed files with 101 additions and 104 deletions
+1 -1
View File
@@ -179,7 +179,7 @@ void CrenelBeanSprout_Action1(CrenelBeanSproutEntity* this) {
RestorePrevTileEntity(0xdc, super->collisionLayer);
sub_08096A78(this);
}
if ((gPlayerState.playerInput.newInput & (PLAYER_INPUT_80 | PLAYER_INPUT_40)) == 0) {
if ((gPlayerState.playerInput.newInput & (INPUT_ACTION | INPUT_40)) == 0) {
return;
}
if (gUnk_0200AF00.rActionPlayerState != R_ACTION_THROW) {
+1 -1
View File
@@ -184,7 +184,7 @@ void sub_0808692C(HouseDoorExteriorEntity* this) {
static u8 sub_08086954(HouseDoorExteriorEntity* this) {
if (sub_0800445C(super)) {
if (GetAnimationStateInRectRadius(super, 6, 20) >= 0 && gPlayerEntity.animationState == 0 &&
(u16)gPlayerState.playerInput.heldInput == PLAYER_INPUT_UP && gPlayerState.jump_status == 0) {
(u16)gPlayerState.playerInput.heldInput == INPUT_UP && gPlayerState.jump_status == 0) {
super->timer--;
}
} else {
+2 -2
View File
@@ -118,8 +118,8 @@ void ItemForSale_Action2(ItemForSaleEntity* this) {
ptr = sub_080784E4();
if (((*(int*)(ptr + 8) == 0) || ((*(u8*)(ptr + 1) != 1 || (gUnk_0200AF00.rActionPlayerState = R_ACTION_SPEAK,
(gPlayerState.playerInput.newInput &
(PLAYER_INPUT_80 | PLAYER_INPUT_8)) == 0)))) &&
((gPlayerState.playerInput.newInput & (PLAYER_INPUT_80 | PLAYER_INPUT_10 | PLAYER_INPUT_8)) != 0)) {
(INPUT_ACTION | INPUT_INTERACT)) == 0)))) &&
((gPlayerState.playerInput.newInput & (INPUT_ACTION | INPUT_CANCEL | INPUT_INTERACT)) != 0)) {
sub_080819B4(this);
}
}
+5 -5
View File
@@ -123,8 +123,8 @@ void LinkHoldingItem_Action2(LinkHoldingItemEntity* this) {
}
void LinkHoldingItem_Action3(LinkHoldingItemEntity* this) {
u32 tmp;
if ((super->parent)->action == 8) {
u32 bottle_no;
if (super->parent->action == PLAYER_ITEMGET) {
return;
}
switch (super->timer) {
@@ -149,9 +149,9 @@ void LinkHoldingItem_Action3(LinkHoldingItemEntity* this) {
ModHealth(160);
break;
case 3:
tmp = GetBottleContaining(super->type);
if (tmp != 0) {
gSave.stats.itemButtons[tmp + 1] = ITEM_BOTTLE_EMPTY;
bottle_no = GetBottleContaining(super->type);
if (bottle_no != 0) {
gSave.stats.bottles[bottle_no - 1] = ITEM_BOTTLE_EMPTY;
} else {
SetInventoryValue(super->type, ITEM_GREEN_SWORD);
}