/** maximum run velocity (pixel/s) */
static const float MAX_RUN_XM = 320;
/** maximum horizontal climb velocity */
-static const float MAX_CLIMB_XM = 48;
+static const float MAX_CLIMB_XM = 96;
/** maximum vertical climb velocity */
static const float MAX_CLIMB_YM = 128;
/** instant velocity when tux starts to walk */
void
Player::start_climbing(Climbable& climbable)
{
- if (climbing == &climbable) return;
+ if (climbing || !&climbable) return;
climbing = &climbable;
physic.enable_gravity(false);
physic.set_velocity(0, 0);
physic.set_acceleration(0, 0);
+ if (backflipping) {
+ backflipping = false;
+ backflip_direction = 0;
+ }
}
void
const float GRACE_DX = 8; // how far off may the player's bounding-box be x-wise
const float GRACE_DY = 8; // how far off may the player's bounding-box be y-wise
const float ACTIVATE_TRY_FOR = 1; // how long to try correcting mis-alignment of player and climbable before giving up
-const float POSITION_FIX_AX = 50; // x-wise acceleration applied to player when trying to align player and Climbable
+const float POSITION_FIX_AX = 30; // x-wise acceleration applied to player when trying to align player and Climbable
const float POSITION_FIX_AY = 50; // y-wise acceleration applied to player when trying to align player and Climbable
}