@@ -84,8 +84,6 @@ class C_BeamSpotLight : public C_BaseEntity
8484 Vector m_vSpotlightDir;
8585
8686 CHandle<C_Beam> m_hSpotlight;
87- // zb14 - adding this due to sdk differences :3
88- // CHandle<C_SpotlightEnd> m_hSpotlightTarget;
8987
9088 float m_flSpotlightCurLength;
9189
@@ -244,7 +242,6 @@ void C_BeamSpotLight::SpotlightCreate(void)
244242
245243 // Set the temporary spawnflag on the beam so it doesn't save (we'll recreate it on restore)
246244 m_hSpotlight->SetHDRColorScale ( m_flHDRColorScale );
247- // const color24 c = GetRenderColor();
248245 const color32 c = GetRenderColor ();
249246 m_hSpotlight->SetColor ( c.r , c.g , c.b );
250247 m_hSpotlight->SetHaloTexture (m_nHaloIndex);
@@ -262,7 +259,7 @@ void C_BeamSpotLight::SpotlightDestroy(void)
262259{
263260 if ( m_hSpotlight )
264261 {
265- UTIL_Remove ( m_hSpotlight );
262+ Release ( );
266263 m_hSpotlight.Term ();
267264 }
268265}
@@ -303,19 +300,16 @@ void C_BeamSpotLight::ComputeRenderInfo()
303300 // Fade out spotlight end if past max length.
304301 if ( m_flSpotlightCurLength > 2 *m_flSpotlightMaxLength )
305302 {
306- // SetRenderAlpha( 0 );
307303 SetRenderColorA ( 0 );
308304 m_hSpotlight->SetFadeLength ( m_flSpotlightMaxLength );
309305 }
310306 else if ( m_flSpotlightCurLength > m_flSpotlightMaxLength )
311307 {
312- // SetRenderAlpha( (1-((m_flSpotlightCurLength-m_flSpotlightMaxLength)/m_flSpotlightMaxLength)) );
313308 SetRenderColorA ( (1 -((m_flSpotlightCurLength-m_flSpotlightMaxLength)/m_flSpotlightMaxLength)) );
314309 m_hSpotlight->SetFadeLength ( m_flSpotlightMaxLength );
315310 }
316311 else
317312 {
318- // SetRenderAlpha( 1.0 );
319313 SetRenderColorA ( 1.0 );
320314 m_hSpotlight->SetFadeLength ( m_flSpotlightCurLength );
321315 }
@@ -332,9 +326,7 @@ void C_BeamSpotLight::ComputeRenderInfo()
332326
333327 if ( m_flLightScale > 0 )
334328 {
335- // const color24 c = GetRenderColor();
336329 const color32 c = GetRenderColor ();
337- // float a = GetRenderAlpha() / 255.0f;
338330 float a = GetRenderColor ().a / 255 .0f ;
339331 ColorRGBExp32 color;
340332 color.r = c.r * a;
0 commit comments