engine-c: scrap mounds + lingering FX + secondary SE clash

This commit is contained in:
local-model/engine-L2-grok-4.5 2026-09-19 14:20:56 +02:00
parent 0897293f51
commit 4411169cc3
No known key found for this signature in database
5 changed files with 243 additions and 22 deletions

View file

@ -88,7 +88,10 @@ void particle_spawn(Game *g, float x, float y, int kind, uint8_t cr, uint8_t cg,
float sp = rng_frange(&g_prng, 10, 60);
p->vx = (float)cosf(ang) * sp;
p->vy = (float)sinf(ang) * sp;
p->life = p->max_life = (kind == 0) ? 1.2f : 0.5f;
/* lingering columns: smoke / fire / spark|debris (KKND2 clash plate) */
if (kind == 0) p->life = p->max_life = 2.8f;
else if (kind == 1) p->life = p->max_life = 1.8f;
else p->life = p->max_life = 1.0f;
p->r = cr; p->g = cg; p->b = cb;
p->kind = kind;
}
@ -105,6 +108,7 @@ void particle_update(Game *g, float dt) {
p->y += p->vy * dt;
p->vx *= 0.92f; p->vy *= 0.92f;
if (p->kind == 1) p->vy += 40 * dt; /* fire rises/slows */
if (p->kind == 0) p->vy -= 18 * dt; /* smoke drifts up */
if (p->life <= 0) {
g->particles[i] = g->particles[g->particle_count - 1];
g->particle_count--;