mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-17 23:15:11 -05:00
Merge pull request #3310 from Pepper0ni/NoSwimAnim
Port Faster Swim animations, full credit to kimimaru4000
This commit is contained in:
commit
360b6b88be
@ -136,6 +136,7 @@ const std::vector<const char*> enhancementsCvars = {
|
|||||||
"gInjectItemCounts",
|
"gInjectItemCounts",
|
||||||
"gDayGravePull",
|
"gDayGravePull",
|
||||||
"gDampeAllNight",
|
"gDampeAllNight",
|
||||||
|
"gSkipSwimDeepEndAnim",
|
||||||
"gSkipScarecrow",
|
"gSkipScarecrow",
|
||||||
"gBlueFireArrows",
|
"gBlueFireArrows",
|
||||||
"gSunlightArrows",
|
"gSunlightArrows",
|
||||||
|
@ -580,6 +580,8 @@ void DrawEnhancementsMenu() {
|
|||||||
"- Obtained the Master Sword\n"
|
"- Obtained the Master Sword\n"
|
||||||
"- Not within range of Time Block\n"
|
"- Not within range of Time Block\n"
|
||||||
"- Not within range of Ocarina playing spots");
|
"- Not within range of Ocarina playing spots");
|
||||||
|
UIWidgets::PaddedEnhancementCheckbox("Skip water take breath animation", "gSkipSwimDeepEndAnim", true, false);
|
||||||
|
UIWidgets::Tooltip("Skips Link's taking breath animation after coming up from water. This setting does not interfere with getting items from underwater.");
|
||||||
ImGui::EndMenu();
|
ImGui::EndMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5862,9 +5862,19 @@ s32 func_8083D12C(PlayState* play, Player* this, Input* arg2) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func_80832340(play, this);
|
func_80832340(play, this);
|
||||||
func_80832B0C(play, this,
|
// Skip take breath animation on surface if Link didn't grab an item while underwater and the setting is enabled
|
||||||
(this->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) ? &gPlayerAnim_link_swimer_swim_get
|
if (CVarGetInteger("gSkipSwimDeepEndAnim", 0) && !(this->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD))
|
||||||
: &gPlayerAnim_link_swimer_swim_deep_end);
|
{
|
||||||
|
auto lastAnimFrame = Animation_GetLastFrame(&gPlayerAnim_link_swimer_swim_deep_end);
|
||||||
|
LinkAnimation_Change(play, &this->skelAnime, &gPlayerAnim_link_swimer_swim_deep_end, 1.0f,
|
||||||
|
lastAnimFrame, lastAnimFrame, ANIMMODE_ONCE, -6.0f);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
func_80832B0C(play, this,
|
||||||
|
(this->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) ? &gPlayerAnim_link_swimer_swim_get
|
||||||
|
: &gPlayerAnim_link_swimer_swim_deep_end);
|
||||||
|
}
|
||||||
|
|
||||||
if (func_8083CFA8(play, this, this->actor.velocity.y, 500)) {
|
if (func_8083CFA8(play, this, this->actor.velocity.y, 500)) {
|
||||||
Player_PlaySfx(&this->actor, NA_SE_PL_FACE_UP);
|
Player_PlaySfx(&this->actor, NA_SE_PL_FACE_UP);
|
||||||
|
Loading…
Reference in New Issue
Block a user