Skip to content

Commit

Permalink
implemented suggestions from akari
Browse files Browse the repository at this point in the history
  • Loading branch information
laochailan committed Dec 27, 2020
1 parent b670393 commit f9dcc2f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
5 changes: 2 additions & 3 deletions src/stages/stagex/nonspells/midboss_nonspells.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ static void draw_wriggle_proj(Projectile *p, int t, ProjDrawRuleArgs args) {
AniSequence *seq = get_ani_sequence(ani, "fly");
r_draw_sprite(&(SpriteParams){
.shader = "sprite_default",
.pos.x = creal(p->pos),
.pos.y = cimag(p->pos),
.scale = {creal(p->scale), cimag(p->scale)},
.pos_as_cmplx = p->pos,
.scale_as_cmplx = p->scale),
.sprite_ptr = animation_get_frame(ani, seq, global.frames),
.color = &p->color,
.rotation.angle = p->angle+M_PI/2,
Expand Down
12 changes: 4 additions & 8 deletions src/stages/stagex/timeline.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ TASK(ngoner_fairy, { cmplx pos; }) {
int laser_time = corners*projs_per_site + assembly_time + 10;

for(int i = 0; i < corners; i++) {
complex offset = rot*b*cdir(M_TAU/corners*i);
cmplx offset = rot*b*cdir(M_TAU/corners*i);
INVOKE_TASK_DELAYED(laser_time, ngoner_laser, e->pos + offset, 5*I*cnormalize(offset));
}

Expand Down Expand Up @@ -241,10 +241,8 @@ TASK(scuttle_appear, { cmplx pos; }) {
STAGE_BOOKMARK(midboss);
Boss *boss = global.boss = TASK_BIND(stagex_spawn_scuttle(ARGS.pos));

Attack *opening_attack = boss_add_attack(boss, AT_Normal, "Opening", 60, 40000, NULL, NULL);

Attack *opening_attack = boss_add_attack(boss, AT_Normal, "Opening", 60, 40000, TASK_INDIRECT(BossAttack, stagex_midboss_nonspell_1), NULL);
boss_start_attack(boss, boss->attacks);
INVOKE_TASK(stagex_midboss_nonspell_1, ENT_BOX(boss), opening_attack);

}

Expand All @@ -254,8 +252,7 @@ TASK(scuttleproj_appear, NO_ARGS) {
.proto = pp_soul,
.color = RGBA(0,0.2,1,0),
.move = move_towards(global.plr.pos, 0.015),
.flags = PFLAG_NOCLEAR | PFLAG_NOCOLLISION,
.max_viewport_dist = 10000, // how to do this properly?
.flags = PFLAG_NOCLEAR | PFLAG_NOCOLLISION | PFLAG_NOAUTOREMOVE,
));
WAIT(20);

Expand Down Expand Up @@ -287,8 +284,7 @@ TASK(scuttleproj_appear, NO_ARGS) {
}
}
}
p->timeout = 1; // what is the proper way?
//p->flags ^= PFLAG_NOCLEAR;
kill_projectile(p);

INVOKE_TASK(scuttle_appear, p->pos);
}
Expand Down

0 comments on commit f9dcc2f

Please sign in to comment.