engine-c: unit mid-layers/tyres + denser combat FX
This commit is contained in:
parent
c60752b878
commit
aac30cb097
4 changed files with 95 additions and 69 deletions
|
|
@ -57,8 +57,12 @@ void bullet_update(Game *g, float dt) {
|
|||
Building *t = bld_by_id(g, b->target_bld);
|
||||
if (t) bld_apply_damage(g, t, b->damage);
|
||||
}
|
||||
particle_burst(g, b->tx, b->ty, 4,
|
||||
(b->kind==2)?2:1, 255, 200, 80);
|
||||
/* denser impact: fire/laser core + smoke ring */
|
||||
int hit_kind = (b->kind == 2) ? 2 : 1;
|
||||
particle_burst(g, b->tx, b->ty, 7, hit_kind, 255, 200, 80);
|
||||
particle_burst(g, b->tx, b->ty, 4, 0, 90, 80, 60);
|
||||
if (b->kind == 1 || b->kind == 3)
|
||||
particle_burst(g, b->tx, b->ty, 3, 3, 255, 140, 40);
|
||||
/* swap-remove */
|
||||
g->bullets[i] = g->bullets[g->bullet_count - 1];
|
||||
g->bullet_count--;
|
||||
|
|
@ -66,9 +70,12 @@ void bullet_update(Game *g, float dt) {
|
|||
}
|
||||
b->x += dx/d * step;
|
||||
b->y += dy/d * step;
|
||||
/* trail */
|
||||
/* trail — denser muzzle streak for non-ballistic shells */
|
||||
if (b->kind != 0)
|
||||
particle_spawn(g, b->x, b->y, 2, 255, 180, 60);
|
||||
if (b->kind == 1 || b->kind == 3)
|
||||
particle_spawn(g, b->x - dx / d * 3.0f, b->y - dy / d * 3.0f,
|
||||
3, 255, 160, 50);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue