Skip to content

Commit b85a031

Browse files
committed
[cleanup] remove util_remove, remove comments from self/old code ref
updating this per NBC's request. also removing useless code i left from compile attempt, and a comment that isn't valid from testing
1 parent 9b86359 commit b85a031

2 files changed

Lines changed: 1 addition & 17 deletions

File tree

sp/src/game/client/c_baseentity.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2317,14 +2317,6 @@ inline bool C_BaseEntity::IsEnabledInToolView() const
23172317
#endif
23182318
}
23192319

2320-
//-----------------------------------------------------------------------------
2321-
// Client version of UTIL_Remove
2322-
//-----------------------------------------------------------------------------
2323-
inline void UTIL_Remove(C_BaseEntity* pEntity)
2324-
{
2325-
pEntity->Remove();
2326-
}
2327-
23282320
//-----------------------------------------------------------------------------
23292321
// Purpose:
23302322
// Input : -

sp/src/game/client/c_beamspotlight.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)