#include <math.h>
#include "growup.h"
-#include "defines.h"
#include "resources.h"
#include "camera.h"
#include "sector.h"
GrowUp::collision(GameObject& other, const CollisionHit& hit)
{
if(other.get_flags() & FLAG_SOLID) {
- if(fabsf(hit.normal.y) > .5) { // roof
+ if(fabsf(hit.normal.y) > .5) { // roof or ground
physic.set_velocity_y(0);
} else { // bumped left or right
physic.set_velocity_x(-physic.get_velocity_x());
Player* player = dynamic_cast<Player*>(&other);
if(player != 0) {
- player->grow();
+ player->set_bonus(GROWUP_BONUS, true);
SoundManager::get()->play_sound(IDToSound(SND_EXCELLENT));
remove_me();