mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-02-23 14:22:16 -05:00
Partially fixes Ice Traps
Obtaining a freestanding Ice Trap causes link to slide forward and receiving one from an NPC plays the sound effect and damage animation but doesn't freeze link.
This commit is contained in:
parent
9616058952
commit
0efb008213
@ -2329,8 +2329,8 @@ GetItemID Randomizer::GetItemFromGet(RandomizerGet randoGet, GetItemID ogItemId)
|
|||||||
// todo figure out what GI_HEART_CONTAINER_2 is
|
// todo figure out what GI_HEART_CONTAINER_2 is
|
||||||
return GI_HEART_CONTAINER;
|
return GI_HEART_CONTAINER;
|
||||||
|
|
||||||
case RG_ICE_TRAP:
|
// case RG_ICE_TRAP:
|
||||||
return GI_ICE_TRAP;
|
// return GI_ICE_TRAP;
|
||||||
|
|
||||||
case RG_MILK:
|
case RG_MILK:
|
||||||
return GI_MILK; //todo logic around needing a bottle?
|
return GI_MILK; //todo logic around needing a bottle?
|
||||||
@ -2429,6 +2429,7 @@ bool Randomizer::IsGetItemRandoExclusive(RandomizerGet randoGet) {
|
|||||||
case RG_BOTTLE_WITH_BUGS:
|
case RG_BOTTLE_WITH_BUGS:
|
||||||
case RG_BOTTLE_WITH_POE:
|
case RG_BOTTLE_WITH_POE:
|
||||||
case RG_BOTTLE_WITH_BIG_POE:
|
case RG_BOTTLE_WITH_BIG_POE:
|
||||||
|
case RG_ICE_TRAP:
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
@ -4807,6 +4808,7 @@ void InitRandoItemTable() {
|
|||||||
|
|
||||||
// Starting here, these do not have ItemIDs or GetItemIDs from vanilla, so I'm using their
|
// Starting here, these do not have ItemIDs or GetItemIDs from vanilla, so I'm using their
|
||||||
// RandomizerGet enum values for both.
|
// RandomizerGet enum values for both.
|
||||||
|
GET_ITEM(RG_ICE_TRAP, OBJECT_INVALID, GID_RUPEE_GOLD, 0, 0, CHEST_ANIM_SHORT),
|
||||||
GET_ITEM(RG_MAGIC_SINGLE, OBJECT_GI_MAGICPOT, GID_MAGIC_SMALL, 0xE4, 0x80, CHEST_ANIM_LONG),
|
GET_ITEM(RG_MAGIC_SINGLE, OBJECT_GI_MAGICPOT, GID_MAGIC_SMALL, 0xE4, 0x80, CHEST_ANIM_LONG),
|
||||||
GET_ITEM(RG_MAGIC_DOUBLE, OBJECT_GI_MAGICPOT, GID_MAGIC_LARGE, 0xE8, 0x80, CHEST_ANIM_LONG),
|
GET_ITEM(RG_MAGIC_DOUBLE, OBJECT_GI_MAGICPOT, GID_MAGIC_LARGE, 0xE8, 0x80, CHEST_ANIM_LONG),
|
||||||
GET_ITEM(RG_DOUBLE_DEFENSE, OBJECT_GI_HEARTS, GID_HEART_CONTAINER, 0xE9, 0x80, CHEST_ANIM_LONG),
|
GET_ITEM(RG_DOUBLE_DEFENSE, OBJECT_GI_HEARTS, GID_HEART_CONTAINER, 0xE9, 0x80, CHEST_ANIM_LONG),
|
||||||
|
@ -1339,7 +1339,7 @@ void EnItem00_DrawCollectible(EnItem00* this, GlobalContext* globalCtx) {
|
|||||||
GetItemEntry randoGetItemEntry =
|
GetItemEntry randoGetItemEntry =
|
||||||
Randomizer_GetRandomizedItem(this->getItemId, this->actor.id, this->ogParams, globalCtx->sceneNum);
|
Randomizer_GetRandomizedItem(this->getItemId, this->actor.id, this->ogParams, globalCtx->sceneNum);
|
||||||
EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItemEntry);
|
EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItemEntry);
|
||||||
GetItem_Draw(globalCtx, randoGetItemEntry.gi);
|
GetItem_Draw(globalCtx, ABS(randoGetItemEntry.gi) - 1);
|
||||||
} else {
|
} else {
|
||||||
s32 texIndex = this->actor.params - 3;
|
s32 texIndex = this->actor.params - 3;
|
||||||
|
|
||||||
@ -1399,7 +1399,7 @@ void EnItem00_DrawHeartPiece(EnItem00* this, GlobalContext* globalCtx) {
|
|||||||
GetItemEntry randoGetItemEntry =
|
GetItemEntry randoGetItemEntry =
|
||||||
Randomizer_GetRandomizedItem(GI_HEART_PIECE, this->actor.id, this->ogParams, globalCtx->sceneNum);
|
Randomizer_GetRandomizedItem(GI_HEART_PIECE, this->actor.id, this->ogParams, globalCtx->sceneNum);
|
||||||
EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItemEntry);
|
EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItemEntry);
|
||||||
GetItem_Draw(globalCtx, ABS(randoGetItemEntry.gi - 1));
|
GetItem_Draw(globalCtx, ABS(randoGetItemEntry.gi) - 1);
|
||||||
} else {
|
} else {
|
||||||
s32 pad;
|
s32 pad;
|
||||||
|
|
||||||
|
@ -6281,7 +6281,12 @@ s32 func_8083E5A8(Player* this, GlobalContext* globalCtx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this->getItemId < GI_MAX) {
|
if (this->getItemId < GI_MAX) {
|
||||||
GetItemEntry giEntry = ItemTable_Retrieve(this->getItemId - 1);
|
GetItemEntry giEntry;
|
||||||
|
if (this->getItemEntry.objectId == OBJECT_INVALID) {
|
||||||
|
giEntry = ItemTable_Retrieve(this->getItemId - 1);
|
||||||
|
} else {
|
||||||
|
giEntry = this->getItemEntry;
|
||||||
|
}
|
||||||
|
|
||||||
if ((interactedActor != &this->actor) && !iREG(67)) {
|
if ((interactedActor != &this->actor) && !iREG(67)) {
|
||||||
interactedActor->parent = &this->actor;
|
interactedActor->parent = &this->actor;
|
||||||
@ -6289,7 +6294,7 @@ s32 func_8083E5A8(Player* this, GlobalContext* globalCtx) {
|
|||||||
|
|
||||||
iREG(67) = false;
|
iREG(67) = false;
|
||||||
|
|
||||||
if (gSaveContext.n64ddFlag && this->getItemId == GI_ICE_TRAP) {
|
if (gSaveContext.n64ddFlag && this->getItemId == RG_ICE_TRAP) {
|
||||||
this->stateFlags1 &= ~(PLAYER_STATE1_10 | PLAYER_STATE1_11);
|
this->stateFlags1 &= ~(PLAYER_STATE1_10 | PLAYER_STATE1_11);
|
||||||
this->actor.colChkInfo.damage = 0;
|
this->actor.colChkInfo.damage = 0;
|
||||||
func_80837C0C(globalCtx, this, 3, 0.0f, 0.0f, 0, 20);
|
func_80837C0C(globalCtx, this, 3, 0.0f, 0.0f, 0, 20);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user