engine-c: denser mid-air tracers + artillery/missile arcs
This commit is contained in:
parent
1ef6df4ce5
commit
b4d3388701
7 changed files with 187 additions and 76 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue