Skip to content

Commit

Permalink
Beamlasers: 0 thickness disables rendering
Browse files Browse the repository at this point in the history
Saves on quads
  • Loading branch information
sprunk committed Jun 2, 2020
1 parent d80b998 commit 66381bf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rts/Sim/Projectiles/WeaponProjectiles/BeamLaserProjectile.cpp
Expand Up @@ -93,6 +93,9 @@ void CBeamLaserProjectile::Update()

void CBeamLaserProjectile::Draw(GL::RenderDataBufferTC* va) const
{
if (thickness <= 0.0)
return;

const float3 midPos = (targetPos + startPos) * 0.5f;
const float3 cameraDir = (midPos - camera->GetPos()).SafeANormalize();
// beam's coor-system; degenerate if targetPos == startPos
Expand Down

0 comments on commit 66381bf

Please sign in to comment.