File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -85,13 +85,15 @@ Trampoline::collision(GameObject& other, const CollisionHit& hit)
85
85
auto player = dynamic_cast <Player*> (&other);
86
86
// Trampoline works for player
87
87
if (player) {
88
+ if (player->m_does_buttjump )
89
+ player->m_does_buttjump = false ;
88
90
float vy = player->get_physic ().get_velocity_y ();
89
91
// player is falling down on trampoline
90
92
if (hit.top && vy >= 0 ) {
91
93
if (!(player->get_status ().bonus == AIR_BONUS))
92
- vy = player->get_controller ().hold (Control::JUMP) ? VY_MIN : VY_INITIAL;
94
+ vy = ( player->get_controller ().hold (Control::JUMP) || player-> get_controller (). hold (Control::DOWN) ) ? VY_MIN : VY_INITIAL;
93
95
else
94
- vy = player->get_controller ().hold (Control::JUMP) ? VY_MIN - 300 : VY_INITIAL - 40 ;
96
+ vy = ( player->get_controller ().hold (Control::JUMP) || player-> get_controller (). hold (Control::DOWN) ) ? VY_MIN - 300 : VY_INITIAL - 40 ;
95
97
player->get_physic ().set_velocity_y (vy);
96
98
SoundManager::current ()->play (TRAMPOLINE_SOUND);
97
99
m_sprite->set_action (" swinging" , 1 );
You can’t perform that action at this time.
0 commit comments