mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-01 08:05:07 -04:00
Conversion of Nabooru Quick Death to VB hook (#120)
* Nabooru quick death conversion * Fix brackets, not sure exactly how this was working before.
This commit is contained in:
parent
de715da184
commit
e71839ed8f
@ -387,6 +387,7 @@ typedef enum {
|
|||||||
/*** Quick Boss Deaths ***/
|
/*** Quick Boss Deaths ***/
|
||||||
// Vanilla condition: true
|
// Vanilla condition: true
|
||||||
GI_VB_PHANTOM_GANON_DEATH_SCENE,
|
GI_VB_PHANTOM_GANON_DEATH_SCENE,
|
||||||
|
GI_VB_NABOORU_KNUCKLE_DEATH_SCENE,
|
||||||
} GIVanillaBehavior;
|
} GIVanillaBehavior;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -25,6 +25,7 @@ extern "C" {
|
|||||||
#include "src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.h"
|
#include "src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.h"
|
||||||
#include "src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h"
|
#include "src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.h"
|
||||||
#include <overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.h>
|
#include <overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.h>
|
||||||
|
#include <overlays/actors/ovl_En_Ik/z_en_ik.h>
|
||||||
#include <objects/object_gnd/object_gnd.h>
|
#include <objects/object_gnd/object_gnd.h>
|
||||||
extern SaveContext gSaveContext;
|
extern SaveContext gSaveContext;
|
||||||
extern PlayState* gPlayState;
|
extern PlayState* gPlayState;
|
||||||
@ -746,6 +747,29 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void*
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case GI_VB_NABOORU_KNUCKLE_DEATH_SCENE: {
|
||||||
|
EnIk* ik = static_cast<EnIk*>(opt);
|
||||||
|
if (CVarGetInteger("gTimeSavers.SkipCutscene.QuickBossDeaths", IS_RANDO)) {
|
||||||
|
// Because no CS in rando, we hide the death of the knuckle by spawning flames and kill the actor
|
||||||
|
if ((ik->actor.colChkInfo.health <= 10)) {
|
||||||
|
s32 i;
|
||||||
|
Vec3f pos;
|
||||||
|
Vec3f sp7C = { 0.0f, 0.5f, 0.0f };
|
||||||
|
int flameAmount = 100;
|
||||||
|
|
||||||
|
for (i = flameAmount; i >= 0; i--) {
|
||||||
|
pos.x = ik->actor.world.pos.x + Rand_CenteredFloat(120.0f);
|
||||||
|
pos.z = ik->actor.world.pos.z + Rand_CenteredFloat(120.0f);
|
||||||
|
pos.y = ik->actor.world.pos.y + 20.0f + Rand_CenteredFloat(120.0f);
|
||||||
|
EffectSsDeadDb_Spawn(gPlayState, &pos, &sp7C, &sp7C, 100, 0, 255, 255, 255, 255, 0, 0, 255, 1, 9,
|
||||||
|
true);
|
||||||
|
}
|
||||||
|
Actor_Kill(&ik->actor);
|
||||||
|
}
|
||||||
|
*should = false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1439,28 +1439,10 @@ void func_80A781CC(Actor* thisx, PlayState* play) {
|
|||||||
if (!Play_InCsMode(play)) {
|
if (!Play_InCsMode(play)) {
|
||||||
this->actor.update = EnIk_Update;
|
this->actor.update = EnIk_Update;
|
||||||
this->actor.draw = EnIk_Draw;
|
this->actor.draw = EnIk_Draw;
|
||||||
// Don't initiate nabooru defeat CS in rando
|
if (GameInteractor_Should(GI_VB_NABOORU_KNUCKLE_DEATH_SCENE, true, this)) {
|
||||||
if (!(IS_RANDO)) {
|
|
||||||
Cutscene_SetSegment(play, gSpiritBossNabooruKnuckleDefeatCs);
|
Cutscene_SetSegment(play, gSpiritBossNabooruKnuckleDefeatCs);
|
||||||
gSaveContext.cutsceneTrigger = 1;
|
gSaveContext.cutsceneTrigger = 1;
|
||||||
Actor_SetScale(&this->actor, 0.01f);
|
Actor_SetScale(&this->actor, 0.01f);
|
||||||
} else {
|
|
||||||
// Because no CS in rando, we hide the death of the knuckle by spawning flames and kill the actor
|
|
||||||
if ((this->actor.colChkInfo.health <= 10)) {
|
|
||||||
s32 i;
|
|
||||||
Vec3f pos;
|
|
||||||
Vec3f sp7C = { 0.0f, 0.5f, 0.0f };
|
|
||||||
int flameAmount = 100;
|
|
||||||
|
|
||||||
for (i = flameAmount; i >= 0; i--) {
|
|
||||||
pos.x = this->actor.world.pos.x + Rand_CenteredFloat(120.0f);
|
|
||||||
pos.z = this->actor.world.pos.z + Rand_CenteredFloat(120.0f);
|
|
||||||
pos.y = this->actor.world.pos.y + 20.0f + Rand_CenteredFloat(120.0f);
|
|
||||||
EffectSsDeadDb_Spawn(play, &pos, &sp7C, &sp7C, 100, 0, 255, 255, 255, 255, 0, 0, 255, 1, 9,
|
|
||||||
true);
|
|
||||||
}
|
|
||||||
Actor_Kill(&this->actor);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Flags_SetEventChkInf(EVENTCHKINF_FINISHED_NABOORU_BATTLE);
|
Flags_SetEventChkInf(EVENTCHKINF_FINISHED_NABOORU_BATTLE);
|
||||||
func_80A7735C(this, play);
|
func_80A7735C(this, play);
|
||||||
|
Loading…
Reference in New Issue
Block a user