+
+ Vector leaf1_pos = Vector(pos.x - POISONIVY_WIDTH - 1, pos.y - POISONIVY_Y_OFFSET);
+ Rect leaf1_bbox = Rect(leaf1_pos.x, leaf1_pos.y, leaf1_pos.x + POISONIVY_WIDTH, leaf1_pos.y + POISONIVY_HEIGHT);
+ if (Sector::current()->is_free_space(leaf1_bbox)) {
+ PoisonIvy* leaf1 = new PoisonIvy(leaf1_bbox.p1.x, leaf1_bbox.p1.y, LEFT);
+ Sector::current()->add_object(leaf1);
+ }
+ Vector leaf2_pos = Vector(pos.x + sprite->get_current_hitbox_width() + 1, pos.y - POISONIVY_Y_OFFSET);
+ Rect leaf2_bbox = Rect(leaf2_pos.x, leaf2_pos.y, leaf2_pos.x + POISONIVY_WIDTH, leaf2_pos.y + POISONIVY_HEIGHT);
+ if (Sector::current()->is_free_space(leaf2_bbox)) {
+ PoisonIvy* leaf2 = new PoisonIvy(leaf2_bbox.p1.x, leaf2_bbox.p1.y, RIGHT);
+ Sector::current()->add_object(leaf2);
+ }
+
+ return true;
+ }
+
+ // if we're still invincible, we ignore the hit
+ if (mystate == STATE_INVINCIBLE) {
+ sound_manager->play("sounds/mr_treehit.ogg", get_pos());
+ player.bounce(*this);
+ return true;
+ }
+
+ // if we're small, we die
+ if (mystate == STATE_NORMAL) {