mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-30 19:40:31 -07:00
Link can move around while carpenters escape (#5055)
This commit is contained in:
parent
818c7e4633
commit
224c810e39
3 changed files with 33 additions and 2 deletions
|
@ -1270,6 +1270,14 @@ typedef enum {
|
|||
// - None
|
||||
VB_PLAY_BOLERO_OF_FIRE_CS,
|
||||
|
||||
// #### `result`
|
||||
// ```c
|
||||
// true
|
||||
// ```
|
||||
// #### `args`
|
||||
// - `*EnDaiku`
|
||||
VB_PLAY_CARPENTER_FREE_CS,
|
||||
|
||||
// #### `result`
|
||||
// Close enough & various cutscene checks
|
||||
// ```c
|
||||
|
|
|
@ -43,6 +43,8 @@ extern void BgSpot03Taki_ApplyOpeningAlpha(BgSpot03Taki* bgSpot03Taki, s32 buffe
|
|||
extern void EnGo2_CurledUp(EnGo2* enGo2, PlayState* play);
|
||||
|
||||
extern void EnRu2_SetEncounterSwitchFlag(EnRu2* enRu2, PlayState* play);
|
||||
|
||||
extern void EnDaiku_EscapeSuccess(EnDaiku* enDaiku, PlayState* play);
|
||||
}
|
||||
|
||||
#define RAND_GET_OPTION(option) Rando::Context::GetInstance()->GetOption(option).Get()
|
||||
|
@ -564,6 +566,17 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_li
|
|||
}
|
||||
break;
|
||||
}
|
||||
case VB_PLAY_CARPENTER_FREE_CS: {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.OnePoint"), IS_RANDO)) {
|
||||
EnDaiku* enDaiku = va_arg(args, EnDaiku*);
|
||||
if (enDaiku->subCamActive) {
|
||||
enDaiku->subCamActive = false;
|
||||
EnDaiku_EscapeSuccess(enDaiku, gPlayState);
|
||||
}
|
||||
*should = false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VB_PLAY_GORON_FREE_CS: {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), IS_RANDO)) {
|
||||
*should = false;
|
||||
|
|
|
@ -451,6 +451,10 @@ void EnDaiku_InitSubCamera(EnDaiku* this, PlayState* play) {
|
|||
this->subCamActive = true;
|
||||
this->escapeSubCamTimer = sEscapeSubCamParams[this->actor.params & 3].maxFramesActive;
|
||||
|
||||
if (!GameInteractor_Should(VB_PLAY_CARPENTER_FREE_CS, true, this)) {
|
||||
return;
|
||||
}
|
||||
|
||||
eyePosDeltaLocal.x = sEscapeSubCamParams[this->actor.params & 3].eyePosDeltaLocal.x;
|
||||
eyePosDeltaLocal.y = sEscapeSubCamParams[this->actor.params & 3].eyePosDeltaLocal.y;
|
||||
eyePosDeltaLocal.z = sEscapeSubCamParams[this->actor.params & 3].eyePosDeltaLocal.z;
|
||||
|
@ -477,6 +481,10 @@ void EnDaiku_InitSubCamera(EnDaiku* this, PlayState* play) {
|
|||
void EnDaiku_UpdateSubCamera(EnDaiku* this, PlayState* play) {
|
||||
s32 pad;
|
||||
|
||||
if (!GameInteractor_Should(VB_PLAY_CARPENTER_FREE_CS, true, this)) {
|
||||
return;
|
||||
}
|
||||
|
||||
this->subCamAtTarget.x = this->actor.world.pos.x;
|
||||
this->subCamAtTarget.y = this->actor.world.pos.y + 60.0f;
|
||||
this->subCamAtTarget.z = this->actor.world.pos.z;
|
||||
|
@ -493,8 +501,10 @@ void EnDaiku_EscapeSuccess(EnDaiku* this, PlayState* play) {
|
|||
Actor* gerudoGuard;
|
||||
Vec3f vec;
|
||||
|
||||
Play_ClearCamera(play, this->subCamId);
|
||||
Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_ACTIVE);
|
||||
if (GameInteractor_Should(VB_PLAY_CARPENTER_FREE_CS, true, this)) {
|
||||
Play_ClearCamera(play, this->subCamId);
|
||||
Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_ACTIVE);
|
||||
}
|
||||
this->subCamActive = false;
|
||||
|
||||
if (GET_EVENTCHKINF_CARPENTERS_FREE_ALL()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue