[Change] Make the start of beam not be so abrupt.
This commit is contained in:
parent
5bf8a0b689
commit
62f7986459
16
src/weapon.c
16
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user