mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-15 14:05:06 -05:00
Fixes vanilla ice traps and randomized ice smoke
This commit is contained in:
parent
4e2707aefc
commit
a67c6b9e67
@ -19,7 +19,7 @@ typedef struct {
|
|||||||
/* 0x03 */ uint16_t textId;
|
/* 0x03 */ uint16_t textId;
|
||||||
/* 0x04 */ uint16_t objectId;
|
/* 0x04 */ uint16_t objectId;
|
||||||
/* 0x06 */ uint16_t modIndex; // 0 = Vanilla, 1 = Randomizer, future mods will increment up?
|
/* 0x06 */ uint16_t modIndex; // 0 = Vanilla, 1 = Randomizer, future mods will increment up?
|
||||||
/* 0x08 */ uint16_t getItemId;
|
/* 0x08 */ int16_t getItemId;
|
||||||
/* 0x0A */ uint16_t gid; // Stores the GID value unmodified for future reference.
|
/* 0x0A */ uint16_t gid; // Stores the GID value unmodified for future reference.
|
||||||
/* 0x0C */ uint16_t collectable; // determines whether the item can be collected on the overworld. Will be true in most cases.
|
/* 0x0C */ uint16_t collectable; // determines whether the item can be collected on the overworld. Will be true in most cases.
|
||||||
} GetItemEntry; // size = 0x0F
|
} GetItemEntry; // size = 0x0F
|
||||||
|
@ -481,8 +481,12 @@ void EnBox_WaitOpen(EnBox* this, GlobalContext* globalCtx) {
|
|||||||
}
|
}
|
||||||
// Chests need to have a negative getItemId in order to not immediately give their item
|
// Chests need to have a negative getItemId in order to not immediately give their item
|
||||||
// when approaching.
|
// when approaching.
|
||||||
sItem.getItemId = 0 - sItem.getItemId;
|
if (gSaveContext.n64ddFlag) {
|
||||||
GiveItemEntryFromActorWithFixedRange(&this->dyna.actor, globalCtx, sItem);
|
sItem.getItemId = 0 - sItem.getItemId;
|
||||||
|
GiveItemEntryFromActorWithFixedRange(&this->dyna.actor, globalCtx, sItem);
|
||||||
|
} else {
|
||||||
|
func_8002F554(&this->dyna.actor, globalCtx, -(this->dyna.actor.params >> 5 & 0x7F));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (Flags_GetTreasure(globalCtx, this->dyna.actor.params & 0x1F)) {
|
if (Flags_GetTreasure(globalCtx, this->dyna.actor.params & 0x1F)) {
|
||||||
EnBox_SetupAction(this, EnBox_Open);
|
EnBox_SetupAction(this, EnBox_Open);
|
||||||
@ -594,7 +598,7 @@ void EnBox_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (((!gSaveContext.n64ddFlag && ((this->dyna.actor.params >> 5 & 0x7F) == 0x7C)) ||
|
if (((!gSaveContext.n64ddFlag && ((this->dyna.actor.params >> 5 & 0x7F) == 0x7C)) ||
|
||||||
(gSaveContext.n64ddFlag && sItem.getItemId == RG_ICE_TRAP)) &&
|
(gSaveContext.n64ddFlag && ABS(sItem.getItemId) == RG_ICE_TRAP)) &&
|
||||||
this->actionFunc == EnBox_Open && this->skelanime.curFrame > 45 &&
|
this->actionFunc == EnBox_Open && this->skelanime.curFrame > 45 &&
|
||||||
this->iceSmokeTimer < 100) EnBox_SpawnIceSmoke(this, globalCtx);
|
this->iceSmokeTimer < 100) EnBox_SpawnIceSmoke(this, globalCtx);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user