engine-c: denser MEDIC/Mendbeast support + tall building fire plumes

This commit is contained in:
local-model/engine-L2-grok-4.5 2026-09-19 17:04:19 +02:00
parent 00b68ddc58
commit 13ab74c64b
No known key found for this signature in database
3 changed files with 69 additions and 18 deletions

View file

@ -164,7 +164,7 @@ int main(int argc, char **argv) {
particle_burst(g, cx - 48, cy - 14, 22, 0, 100, 95, 85);
particle_burst(g, cx + 16, cy + 48, 20, 3, 85, 70, 55);
particle_burst(g, cx - 12, cy - 48, 20, 1, 255, 160, 50);
/* building smoke / fire columns near clash (HQ, walls, turrets) */
/* tall stacked building smoke / fire plumes (HQ, walls, turrets) */
for (int i = 0; i < g->bld_count; i++) {
Building *bl = &g->buildings[i];
if (bl->dead || bl->build < 1.0f) continue;
@ -172,11 +172,20 @@ int main(int argc, char **argv) {
float by = (float)(bl->ty * TILE + bl->h * TILE / 2);
float bdx = bx - clash_x, bdy = by - clash_y;
if (bdx * bdx + bdy * bdy > r2) continue;
int smoke_n = (bl->type == BT_BASE || bl->type == BT_TURRET) ? 18 : 12;
int heavy = (bl->type == BT_BASE || bl->type == BT_TURRET);
int smoke_n = heavy ? 22 : 14;
/* Y-offset stack: base → mid → high → tip */
particle_burst(g, bx, by - 10.0f, smoke_n, 0, 105, 95, 85);
particle_burst(g, bx + 3.0f, by - 28.0f, smoke_n - 4, 0, 95, 88, 78);
particle_burst(g, bx - 2.0f, by - 46.0f, smoke_n - 8, 0, 85, 80, 72);
particle_burst(g, bx + 1.0f, by - 64.0f, smoke_n - 12, 0, 75, 70, 65);
if (bl->hp < bl->max_hp * 0.85f || bl->type == BT_TURRET) {
particle_burst(g, bx + 4.0f, by - 6.0f, 14, 1, 255, 130, 40);
particle_burst(g, bx + 4.0f, by - 6.0f, 16, 1, 255, 130, 40);
particle_burst(g, bx - 3.0f, by - 28.0f, 14, 1, 255, 110, 35);
particle_burst(g, bx + 2.0f, by - 46.0f, 12, 1, 255, 150, 45);
particle_burst(g, bx - 1.0f, by - 64.0f, 10, 1, 255, 90, 30);
particle_burst(g, bx - 3.0f, by - 14.0f, 8, 3, 90, 75, 60);
particle_burst(g, bx + 5.0f, by - 36.0f, 6, 3, 80, 65, 50);
}
}
/* muzzle flashes on units in the clash radius */
@ -270,6 +279,30 @@ int main(int argc, char **argv) {
particle_burst(g, c2x + 10, c2y + 24, 28, 1, 255, 160, 50);
particle_burst(g, c2x - 28, c2y + 8, 24, 0, 100, 95, 80);
particle_burst(g, c2x + 32, c2y - 16, 22, 1, 255, 120, 40);
/* SE building fire/smoke columns (same tall stack) */
{
const float r2b = 140.0f * 140.0f;
for (int i = 0; i < g->bld_count; i++) {
Building *bl = &g->buildings[i];
if (bl->dead || bl->build < 1.0f) continue;
float bx = (float)(bl->tx * TILE + bl->w * TILE / 2);
float by = (float)(bl->ty * TILE + bl->h * TILE / 2);
float bdx = bx - clash2_x, bdy = by - clash2_y;
if (bdx * bdx + bdy * bdy > r2b) continue;
int heavy = (bl->type == BT_BASE || bl->type == BT_TURRET);
int smoke_n = heavy ? 18 : 12;
particle_burst(g, bx, by - 10.0f, smoke_n, 0, 100, 92, 82);
particle_burst(g, bx + 2.0f, by - 28.0f, smoke_n - 4, 0, 90, 84, 74);
particle_burst(g, bx - 2.0f, by - 46.0f, smoke_n - 8, 0, 80, 76, 68);
particle_burst(g, bx + 1.0f, by - 64.0f, smoke_n - 10, 0, 70, 66, 60);
if (bl->hp < bl->max_hp * 0.85f || bl->type == BT_TURRET) {
particle_burst(g, bx + 3.0f, by - 8.0f, 14, 1, 255, 125, 38);
particle_burst(g, bx - 2.0f, by - 28.0f, 12, 1, 255, 105, 32);
particle_burst(g, bx + 2.0f, by - 46.0f, 10, 1, 255, 145, 42);
particle_burst(g, bx - 1.0f, by - 64.0f, 8, 1, 255, 95, 28);
}
}
}
{
int spawned2 = 0;
const float pair_r2 = 160.0f * 160.0f;