#include "level.h"
#include "sector.h"
#include "tilemap.h"
+#include "statistics.h"
Sprite* img_mriceblock_flat_left;
Sprite* img_mriceblock_flat_right;
BadGuy::check_horizontal_bump(bool checkcliff)
{
float halfheight = base.height / 2;
- if (dir == LEFT && issolid( base.x, (int) base.y + halfheight))
+ if (dir == LEFT && issolid( base.x, base.y + halfheight))
{
if (kind == BAD_MRICEBLOCK && mode == KICK)
+ {
Sector::current()->trybreakbrick(Vector(base.x, base.y + halfheight), false);
+ Sector::current()->tryemptybox(Vector(base.x, base.y + halfheight), dir);
+ }
dir = RIGHT;
physic.set_velocity(-physic.get_velocity_x(), physic.get_velocity_y());
return;
}
- if (dir == RIGHT && issolid( base.x + base.width, (int)base.y + halfheight))
+ if (dir == RIGHT && issolid( base.x + base.width, base.y + halfheight))
{
if (kind == BAD_MRICEBLOCK && mode == KICK)
+ {
Sector::current()->trybreakbrick(
- Vector(base.x + base.width, (int) base.y + halfheight), false);
+ Vector(base.x + base.width, base.y + halfheight), false);
+ Sector::current()->tryemptybox(
+ Vector(base.x + base.width, base.y + halfheight), dir);
+ }
dir = LEFT;
physic.set_velocity(-physic.get_velocity_x(), physic.get_velocity_y());
Sector::current()->add_score(Vector(base.x, base.y),
25 * player_status.score_multiplier);
SoundManager::get()->play_sound(IDToSound(SND_SQUISH), get_pos(), Sector::current()->player->get_pos());
+
+ global_stats.add_points(BADGUYS_SQUISHED_STAT, 1);
player_status.score_multiplier++;
return;
Sector::current()->add_score(Vector(base.x, base.y),
25 * player_status.score_multiplier);
+
+ global_stats.add_points(BADGUYS_SQUISHED_STAT, 1);
player_status.score_multiplier++;
// simply remove the fish...
player->bounce(this);
base.y += 66 - base.height;
-
+
+ global_stats.add_points(BADGUYS_SQUISHED_STAT, 1);
Sector::current()->add_score(Vector(base.x, base.y),
25 * player_status.score_multiplier);
player_status.score_multiplier++;