+ if (lifetime.check()) {
+ explode();
+ }
+ else {
+ if (groundhit_pos_set) {
+ if (movement_timer.check()) {
+ if (direction == 1) direction = -1; else direction = 1;
+ int speed = (BASE_SPEED + (gameRandom.rand(RAND_SPEED))) * direction;
+ physic.set_velocity_x(speed);
+ movement_timer.start(MOVETIME);
+ }
+ }
+ /*
+ if (Sector::current()->solids->get_tile_at(get_pos())->getAttributes() == 16) {
+ //HIT WATER
+ Sector::current()->add_object(new Electrifier(75,1421,1.5));
+ Sector::current()->add_object(new Electrifier(76,1422,1.5));
+ explode();
+ }
+ if (Sector::current()->solids->get_tile_at(get_pos())->getAttributes() == 48) {
+ //HIT ELECTRIFIED WATER
+ explode();
+ }
+ */
+ }