mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-21 23:58:51 -05:00
Fix modifiers crash when obtaining underwater item (#4110)
* NULL check * Update soh/src/overlays/actors/ovl_player_actor/z_player.c Co-authored-by: Garrett Cox <garrettjcox@gmail.com> * Update soh/src/overlays/actors/ovl_player_actor/z_player.c Co-authored-by: Garrett Cox <garrettjcox@gmail.com> --------- Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
This commit is contained in:
parent
63bc2aff59
commit
65b18d61cf
@ -12116,7 +12116,8 @@ void func_8084AEEC(Player* this, f32* arg1, f32 arg2, s16 arg3) {
|
||||
} else if (gWalkSpeedToggle2) {
|
||||
swimMod *= CVarGetFloat(CVAR_SETTING("WalkModifier.SwimMapping2"), 1.0f);
|
||||
}
|
||||
} else {
|
||||
// sControlInput is NULL to prevent inputs while surfacing after obtaining an underwater item so we want to ignore it for that case
|
||||
} else if (sControlInput != NULL) {
|
||||
if (CHECK_BTN_ALL(sControlInput->cur.button, BTN_MODIFIER1)) {
|
||||
swimMod *= CVarGetFloat(CVAR_SETTING("WalkModifier.SwimMapping1"), 1.0f);
|
||||
} else if (CHECK_BTN_ALL(sControlInput->cur.button, BTN_MODIFIER2)) {
|
||||
|
Loading…
Reference in New Issue
Block a user