- fixed bug that caused tux to only high jump to the right
SVN-Revision: 912
}
// if we're in a solid tile at start correct that now
- if(kind != BAD_FLAME && kind != BAD_FISH && collision_object_map(base)) {
- printf("Warning: badguy started in wall!.\n");
- while(collision_object_map(base))
- --base.y;
- }
+ if(kind != BAD_FLAME && kind != BAD_FISH && collision_object_map(base))
+ {
+ std::cout << "Warning: badguy started in wall: kind: " << badguykind_to_string(kind)
+ << " pos: (" << base.x << ", " << base.y << ")" << std::endl;
+ while(collision_object_map(base))
+ --base.y;
+ }
}
void
if (on_ground())
{
// jump higher if we are running
- if (physic.get_velocity_x() > MAX_WALK_XM)
+ if (fabs(physic.get_velocity_x()) > MAX_WALK_XM)
physic.set_velocity_y(5.8);
else
physic.set_velocity_y(5.2);