activate();
}
- if (might_fall() && !recently_changed_direction )
+ if (on_ground() && might_fall() && !recently_changed_direction )
{
recently_changed_direction = true;
dir = (dir == LEFT ? RIGHT : LEFT);
void
MrTree::collision_solid(const CollisionHit& hit)
{
+ update_on_ground_flag(hit);
+
if(hit.top || hit.bottom) {
physic.set_velocity_y(0);
} else {