Enabled camera controls while lock-on shielding.

This commit is contained in:
LT-Schmiddy 2025-05-30 18:44:42 -04:00
parent a58095e4b0
commit c8e76a54e7
2 changed files with 4 additions and 2 deletions

View file

@ -1496,7 +1496,6 @@ RECOMP_PATCH void Player_Action_18(Player* this, PlayState* play) {
if (inverted_x) {
xStick = -xStick;
}
recomp_printf("Shielding X=%f, Y=%f\n", xStick, yStick);
var_a1 = (yStick * Math_CosS(temp_a0)) + (Math_SinS(temp_a0) * xStick);
temp_ft5 = (xStick * Math_CosS(temp_a0)) - (Math_SinS(temp_a0) * yStick);

View file

@ -36,8 +36,11 @@ void controls_play_update(PlayState* play) {
gSaveContext.options.zTargetSetting = recomp_get_targeting_mode();
Player* player = GET_PLAYER(play);
Camera* camera = GET_ACTIVE_CAM(play);
recomp_get_mouse_deltas(&mouse_input_handler.delta_x, &mouse_input_handler.delta_y);
mouse_input_handler.crouch_shielding = player->stateFlags1 & PLAYER_STATE1_400000;
//mouse_input_handler.crouch_shielding = player->stateFlags1 == PLAYER_STATE1_400000;
mouse_input_handler.crouch_shielding = ((player->stateFlags1 == PLAYER_STATE1_400000) && !(camera->mode == CAM_MODE_TARGET || camera->mode == CAM_MODE_FOLLOWTARGET));
if (mouse_input_handler.crouch_shielding) {
mouse_input_handler.shield_pos_x -= mouse_input_handler.delta_x * 10.0f;