Skip to content

Commit

Permalink
Merge pull request #534 from sprunk/patch-53
Browse files Browse the repository at this point in the history
Beamlasers: 0 thickness disables rendering
  • Loading branch information
gajop committed Jun 2, 2020
2 parents d80b998 + 66381bf commit d025ca6
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 d025ca6

Please sign in to comment.