Skip to content

Commit

Permalink
Fix ability keep applied on certain situation
Browse files Browse the repository at this point in the history
- Fix umbrella keep applied on pause-release-resume
- Fix umbrella keep applied on split while using it
  • Loading branch information
copyrat90 committed Jul 11, 2021
1 parent 7f13b03 commit 2769716
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/game_system_PhysicsMovement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,18 @@ void PhysicsMovement::PlayerKeyboardHandle_()
{
symbolAbilityRelease(*state_.symbolsInHands[1]);
}
// left symbol ability: Cancel
if ((mergeOngoing || bn::keypad::start_pressed()) && state_.symbolsInHands[0] &&
state_.symbolsInHands[0]->GetAbilityState() == entity::Symbol::AbilityState::USING)
{
symbolAbilityRelease(*state_.symbolsInHands[0]);
}
// right symbol ability: Cancel
if ((mergeOngoing || bn::keypad::start_pressed()) && state_.symbolsInHands[1] &&
state_.symbolsInHands[1]->GetAbilityState() == entity::Symbol::AbilityState::USING)
{
symbolAbilityRelease(*state_.symbolsInHands[1]);
}

if (!mergeOngoing && bn::keypad::a_pressed() && state_.player.GetGrounded() && !pressAJumping_)
{
Expand Down

0 comments on commit 2769716

Please sign in to comment.