mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-23 06:35:33 -07:00
Merge pull request #28 from MelonSpeedruns/melon-randomizer
fixed warps
This commit is contained in:
commit
c97707fab3
1 changed files with 5 additions and 6 deletions
|
@ -461,11 +461,14 @@ s32 DoorWarp1_PlayerInRange(DoorWarp1* this, GlobalContext* globalCtx) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 successWarp = 0;
|
|
||||||
void GivePlayerRandoReward(DoorWarp1* this, Player* player, GlobalContext* globalCtx, u8 ruto, u8 adult) {
|
void GivePlayerRandoReward(DoorWarp1* this, Player* player, GlobalContext* globalCtx, u8 ruto, u8 adult) {
|
||||||
GetItemID getItemId = GetRandomizedItemId(GI_NONE, this->actor.id, this->actor.params, globalCtx->sceneNum);
|
GetItemID getItemId = GetRandomizedItemId(GI_NONE, this->actor.id, this->actor.params, globalCtx->sceneNum);
|
||||||
|
|
||||||
if (successWarp && !Player_InBlockingCsMode(globalCtx, GET_PLAYER(globalCtx))) {
|
if (this->actor.parent->id == GET_PLAYER(globalCtx)->actor.id && !Flags_GetTreasure(globalCtx, 0x1F)) {
|
||||||
|
Flags_SetTreasure(globalCtx, 0x1F);
|
||||||
|
} else if (!Flags_GetTreasure(globalCtx, 0x1F)) {
|
||||||
|
func_8002F434(&this->actor, globalCtx, getItemId, 10000.0f, 100.0f);
|
||||||
|
} else if (!Player_InBlockingCsMode(globalCtx, GET_PLAYER(globalCtx))) {
|
||||||
if (adult) {
|
if (adult) {
|
||||||
OnePointCutscene_Init(globalCtx, 0x25E8, 999, &this->actor, MAIN_CAM);
|
OnePointCutscene_Init(globalCtx, 0x25E8, 999, &this->actor, MAIN_CAM);
|
||||||
func_8002DF54(globalCtx, &this->actor, 10);
|
func_8002DF54(globalCtx, &this->actor, 10);
|
||||||
|
@ -492,10 +495,6 @@ void GivePlayerRandoReward(DoorWarp1* this, Player* player, GlobalContext* globa
|
||||||
DoorWarp1_SetupAction(this, DoorWarp1_ChildWarpOut);
|
DoorWarp1_SetupAction(this, DoorWarp1_ChildWarpOut);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
successWarp = 0;
|
|
||||||
} else if (!successWarp) {
|
|
||||||
successWarp = func_8002F434(&this->actor, globalCtx, getItemId, 10000.0f, 100.0f);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue