mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-10-13 15:33:53 -04:00
SwitchAge: prevent Link walking without collision for a bit (#7286)
This commit is contained in:
@@ -28,6 +28,7 @@ void SwitchAge() {
|
||||
gSaveContext.respawn[RESPAWN_MODE_DOWN].roomIndex = gPlayState->roomCtx.curRoom.num;
|
||||
gSaveContext.respawn[RESPAWN_MODE_DOWN].pos = player->actor.world.pos;
|
||||
gSaveContext.respawn[RESPAWN_MODE_DOWN].yaw = player->actor.shape.rot.y;
|
||||
gSaveContext.entranceSpeed = 0.0f;
|
||||
|
||||
if (gPlayState->roomCtx.curRoom.behaviorType2 < 4) {
|
||||
gSaveContext.respawn[RESPAWN_MODE_DOWN].playerParams = 0x0DFF;
|
||||
@@ -58,8 +59,12 @@ void SwitchAge() {
|
||||
}
|
||||
|
||||
static HOOK_ID hookId = 0;
|
||||
if (hookId != 0) {
|
||||
GameInteractor::Instance->UnregisterGameHookForID<GameInteractor::OnVanillaBehavior>(hookId);
|
||||
}
|
||||
hookId = REGISTER_VB_SHOULD(VB_INFLICT_VOID_DAMAGE, {
|
||||
*should = false;
|
||||
GameInteractor::Instance->UnregisterGameHookForID<GameInteractor::OnVanillaBehavior>(hookId);
|
||||
hookId = 0;
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user