void ai_missile_boom_spawner(Object *o) { if ((++o->timer % 3) != 1) return; if (o->state == 0) { o->state = 1; o->timer = 0; o->xmark = o->x; o->ymark = o->y; // give us the same bounding box as the boomflash effects o->sprite = SPR_BOOMFLASH; o->invisible = true; } int range = o->shot.boomspawner.range; o->x = o->xmark + (random(-range, range) << CSF); o->y = o->ymark + (random(-range, range) << CSF); effect(o->x, o->y, EFFECT_BOOMFLASH); missilehitsmoke(o); damage_all_enemies_in_bb(o, FLAG_INVULNERABLE); if (--o->shot.boomspawner.booms_left <= 0) o->Delete(); }
void ai_missile_boom_spawner_tick(Object *o) { damage_all_enemies_in_bb(o, FLAG_INVULNERABLE, o->CenterX(), o->CenterY(), o->shot.boomspawner.range); }