engine-c: denser mid-air tracers + artillery/missile arcs

This commit is contained in:
local-model/engine-L2-grok-4.5 2026-09-19 17:42:57 +02:00
parent 1ef6df4ce5
commit b4d3388701
No known key found for this signature in database
7 changed files with 187 additions and 76 deletions

View file

@ -351,8 +351,8 @@ static void unit_combat_step(Game *g, Unit *u, float dt) {
if ((tu || tb) && d <= rng) {
u->heading = (float)atan2(ty - u->y, tx - u->x);
if (u->atk_cd <= 0) {
int kind = (u->type == UT_ARTILLERY || u->type == UT_MISSILE || u->type == UT_TANK)
? 1 : 0;
int kind = (u->type == UT_MISSILE) ? 3
: (u->type == UT_ARTILLERY || u->type == UT_TANK) ? 1 : 0;
/* muzzle offset along heading so shot/live FX sit at barrel tip */
float mx = u->x + cosf(u->heading) * 14.0f;
float my = u->y + sinf(u->heading) * 14.0f;