diff --git a/src/weapon.c b/src/weapon.c index cfa45e6..73382a3 100644 --- a/src/weapon.c +++ b/src/weapon.c @@ -379,6 +379,8 @@ static void weapon_render(const Weapon* w) { case OUTFIT_TYPE_BEAM: case OUTFIT_TYPE_TURRET_BEAM: gfx = outfit_gfx(w->outfit); + + /* Position. */ x = w->solid->pos.x - VX(*gl_camera) + gui_xoff; y = w->solid->pos.y - VY(*gl_camera) + gui_yoff; @@ -395,15 +397,25 @@ static void weapon_render(const Weapon* w) { /* Actual rendering. */ glBegin(GL_QUAD_STRIP); - COLOUR(cWhite); - /* Full strength. */ + /* Start fading. */ + ACOLOUR(cWhite, 0.); + glTexCoord2d(0., 0.); glVertex2d(-gfx->sh/2., 0.); glTexCoord2d(0., 1.); glVertex2d(+gfx->sh/2., 0.); + /* Full Strength. */ + COLOUR(cWhite); + + glTexCoord2d(10. / gfx->sw, 0.); + glVertex2d(-gfx->sh/2., 10.); + + glTexCoord2d(10. / gfx->sw, 1.); + glVertex2d(+gfx->sh/2., 10.); + glTexCoord2d(0.8*w->outfit->u.bem.range / gfx->sw, 0.); glVertex2d(+gfx->sh/2., 0.8*w->outfit->u.bem.range);