+
+ if (input.down == DOWN && !on_ground() && !duck)
+ butt_jump = true;
+ else if (input.down == UP)
+ butt_jump = false;
+ if (input.down == DOWN && butt_jump && on_ground())
+ {
+ if (isbrick(base.x, base.y + base.height))
+ World::current()->trybreakbrick(base.x, base.y + base.height, false);
+ if (isbrick(base.x + base.width, base.y + base.height))
+ World::current()->trybreakbrick(base.x + base.width, base.y + base.height, false);
+
+ butt_jump = false;
+ }
+
+
+ if ( (issolid(base.x + base.width / 2, base.y + base.height + 64) ||
+ issolid(base.x + 1, base.y + base.height + 64) ||
+ issolid(base.x + base.width - 1, base.y + base.height + 64))
+ && jumping == false
+ && can_jump == false
+ && input.up == DOWN
+ && input.old_up == UP)
+ {
+ can_jump = true;
+ }
+
+ input.old_up = input.up;