- if(other.get_flags() & FLAG_SOLID) {
- if(fabsf(hit.normal.y) > .5) { // roof or floor bump
- physic.set_velocity_y(-physic.get_velocity_y());
- life_count -= 1;
- } else { // bumped left or right
- if(kind == FIRE_BULLET)
- remove_me();
- else
- physic.set_velocity_x(-physic.get_velocity_x());
- }
-
- return CONTINUE;
- }
-
- // hit a Badguy
- BadGuy* badguy = dynamic_cast<BadGuy*> (&other);
- if(badguy) {
- remove_me();
- return FORCE_MOVE;
+ if(hit.top || hit.bottom) {
+ physic.set_velocity_y(-physic.get_velocity_y());
+ life_count--;
+ } else if(hit.left || hit.right) {
+ if(type == ICE_BONUS) {
+ physic.set_velocity_x(-physic.get_velocity_x());
+ life_count--;
+ } else
+ remove_me();