X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=main.c;h=b8b03c376f3b315e8ceff72eccec572595eb4d2f;hp=43d7bda27f85d3769c51de4ecacf9a5588bf3e54;hb=f1cd2ff38dd9f3c5c4925d8a5f9588129b3bf343;hpb=cffdedca2aba899f3e0f8b98f67b9125edf6b5a5 diff --git a/main.c b/main.c index 43d7bda..b8b03c3 100644 --- a/main.c +++ b/main.c @@ -256,6 +256,7 @@ draw_engine_dots(SDL_Surface *s) { uint16_t *pixels = (uint16_t *) s->pixels; int row_inc = s->pitch/sizeof(uint16_t); int heatindex; + Sprite *hit; for(i = 0; itype != SHIP) { // they shouldn't hit the ship, but they do + edot[i].active = 0; + hit->dx += ENGINE_DOT_WEIGHT * edot[i].life * edot[i].dx / sprite_mass(hit); + hit->dy += ENGINE_DOT_WEIGHT * edot[i].life * edot[i].dy / sprite_mass(hit); + continue; + } + } heatindex = edot[i].life * 6; c = heatindex>3*W ? heatcolor[3*W-1] : heatcolor[heatindex]; pixels[row_inc*(int)(edot[i].y) + (int)(edot[i].x)] = c;