// hit from above?
if (player->get_bbox().p2.y < (bbox.p1.y + 16)) {
+ if(player->is_stone()) {
+ kill_fall();
+ return FORCE_MOVE;
+ }
if(collision_squished(*player)) {
return FORCE_MOVE;
}
}
+ if(player->is_stone()) {
+ collision_solid(hit);
+ return FORCE_MOVE;
+ }
+
return collision_player(*player, hit);
}
}
}
}
- /*ability_timer.started() ? gliding = true : ability_timer.start(player_status->max_air_time);*/
- //}
+
+
// Let go of jump key
else if(!controller->hold(Controller::JUMP)) {
if (!backflipping && jumping && physic.get_velocity_y() < 0) {
}
/* Handle horizontal movement: */
- if (!backflipping) handle_horizontal_input();
+ if (!backflipping && !stone) handle_horizontal_input();
/* Jump/jumping? */
if (on_ground())
can_jump = true;
/* Handle vertical movement: */
- handle_vertical_input();
+ if (!stone) handle_vertical_input();
/* Shoot! */
if (controller->pressed(Controller::ACTION) && (player_status->bonus == FIRE_BONUS || player_status->bonus == ICE_BONUS)) {
}
}
+ /* Turn to Stone */
+ if (controller->pressed(Controller::DOWN) && player_status->bonus == EARTH_BONUS) {
+ if (controller->hold(Controller::ACTION)) {
+ jump_early_apex = false;
+ stone = true;
+ }
+ }
+
+ if (stone)
+ apply_friction();
+
+ /* Revert from Stone */
+ if (stone && !controller->hold(Controller::ACTION))
+ stone = false;
+
/* Duck or Standup! */
- if (controller->hold(Controller::DOWN)) {
+ if (controller->hold(Controller::DOWN) && !stone) {
do_duck();
} else {
do_standup();
if(badguy != NULL) {
if(safe_timer.started() || invincible_timer.started())
return FORCE_MOVE;
+ if(stone)
+ return ABORT_MOVE;
return CONTINUE;
}
if(dying || deactivated || is_winning() )
return;
- if(!completely && (safe_timer.started() || invincible_timer.started()))
+ if(!completely && (safe_timer.started() || invincible_timer.started() || stone))
return;
growing = false;