Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/common/language.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//====== Copyright � 1996-2004, Valve Corporation, All rights reserved. =======
//====== Copyright © 1996-2004, Valve Corporation, All rights reserved. =======
//
// Purpose: languages definition
//
Expand All @@ -14,9 +14,9 @@

struct Language_t
{
char *m_pchName;
char *m_pchShortName;
char *m_pchVGUILocalizationName;
const char *m_pchName;
const char *m_pchShortName;
const char *m_pchVGUILocalizationName;
ELanguage m_ELanguage;
};

Expand Down
2 changes: 1 addition & 1 deletion src/fgdlib/gamedata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ static bool DoGetToken(TokenReader &tr, char **ppszStore, int nSize, trtoken_t t
// We didn't get the expected token type but no expected
// string was specified.
//
char *pszTokenName;
const char *pszTokenName;
switch (ttexpecting)
{
case IDENT:
Expand Down
4 changes: 2 additions & 2 deletions src/fgdlib/gdvar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
typedef struct
{
GDIV_TYPE eType; // The enumeration of this type.
char *pszName; // The name of this type.
const char *pszName; // The name of this type.
trtoken_t eStoreAs; // How this type is stored (STRING, INTEGER, etc).
} TypeMap_t;

Expand Down Expand Up @@ -64,7 +64,7 @@ static TypeMap_t TypeMap[] =
};


char *GDinputvariable::m_pszEmpty = "";
const char *GDinputvariable::m_pszEmpty = "";


//-----------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions src/fgdlib/inputoutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
typedef struct
{
InputOutputType_t eType; // The enumeration of this type.
char *pszName; // The name of this type.
const char *pszName; // The name of this type.
} TypeMap_t;


char *CClassInputOutputBase::g_pszEmpty = "";
const char *CClassInputOutputBase::g_pszEmpty = "";


//-----------------------------------------------------------------------------
Expand Down
18 changes: 9 additions & 9 deletions src/fgdlib/wckeyvalues.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ WCKeyValuesT<Base>::~WCKeyValuesT(void)
template<class Base>
const char *WCKeyValuesT<Base>::GetValue(const char *pszKey, int *piIndex) const
{
int i = FindByKeyName( pszKey );
if ( i == GetInvalidIndex() )
int i = this->FindByKeyName( pszKey );
if ( i == this->GetInvalidIndex() )
{
return NULL;
}
Expand All @@ -149,7 +149,7 @@ const char *WCKeyValuesT<Base>::GetValue(const char *pszKey, int *piIndex) const
if(piIndex)
piIndex[0] = i;

return m_KeyValues[i].szValue;
return this->m_KeyValues[i].szValue;
}
}

Expand Down Expand Up @@ -233,8 +233,8 @@ void WCKeyValuesT<Base>::SetValue(const char *pszKey, const char *pszValue)
StripEdgeWhiteSpace(szTmpKey);
StripEdgeWhiteSpace(szTmpValue);

int i = FindByKeyName( szTmpKey );
if ( i == GetInvalidIndex() )
int i = this->FindByKeyName( szTmpKey );
if ( i == this->GetInvalidIndex() )
{
if ( pszValue )
{
Expand All @@ -244,21 +244,21 @@ void WCKeyValuesT<Base>::SetValue(const char *pszKey, const char *pszValue)
MDkeyvalue newkv;
Q_strncpy( newkv.szKey, szTmpKey, sizeof( newkv.szKey ) );
Q_strncpy( newkv.szValue, szTmpValue, sizeof( newkv.szValue ) );
InsertKeyValue( newkv );
this->InsertKeyValue( newkv );
}
}
else
{
if (pszValue != NULL)
{
V_strncpy(m_KeyValues[i].szValue, szTmpValue, sizeof(m_KeyValues[i].szValue));
V_strncpy(this->m_KeyValues[i].szValue, szTmpValue, sizeof(this->m_KeyValues[i].szValue));
}
//
// If we are setting to a NULL value, delete the key.
//
else
{
RemoveKeyAt( i );
this->RemoveKeyAt( i );
}
}
}
Expand All @@ -270,7 +270,7 @@ void WCKeyValuesT<Base>::SetValue(const char *pszKey, const char *pszValue)
template<class Base>
void WCKeyValuesT<Base>::RemoveAll(void)
{
m_KeyValues.RemoveAll();
this->m_KeyValues.RemoveAll();
}


Expand Down
4 changes: 2 additions & 2 deletions src/game/client/bone_merge_cache.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
Expand Down Expand Up @@ -96,7 +96,7 @@ void CBoneMergeCache::UpdateCache()
m_pFollowHdr->pBone( parentBoneIndex )->pszName(), m_pFollowHdr->pszName() );

static CUtlSymbolTableMT s_FollowerWarnings;
if ( UTL_INVAL_SYMBOL == s_FollowerWarnings.Find( sz ) )
if ( !s_FollowerWarnings.Find( sz ).IsValid() )
{
s_FollowerWarnings.AddString( sz );
Warning( "%s", sz );
Expand Down
4 changes: 2 additions & 2 deletions src/game/client/c_baseanimating.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===== Copyright � 1996-2005, Valve Corporation, All rights reserved. ======//
//===== Copyright © 1996-2005, Valve Corporation, All rights reserved. ======//
//
// Purpose:
//
Expand Down Expand Up @@ -367,7 +367,7 @@ void C_ClientRagdoll::OnRestore( void )
RagdollMoved();
}

void C_ClientRagdoll::ImpactTrace( trace_t *pTrace, int iDamageType, char *pCustomImpactName )
void C_ClientRagdoll::ImpactTrace( trace_t *pTrace, int iDamageType, const char *pCustomImpactName )
{
VPROF( "C_ClientRagdoll::ImpactTrace" );

Expand Down
4 changes: 2 additions & 2 deletions src/game/client/c_baseanimating.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===== Copyright � 1996-2005, Valve Corporation, All rights reserved. ======//
//===== Copyright © 1996-2005, Valve Corporation, All rights reserved. ======//
//
// Purpose:
//
Expand Down Expand Up @@ -685,7 +685,7 @@ class C_ClientRagdoll : public C_BaseAnimating, public IPVSNotify

virtual void Release( void );
virtual void SetupWeights( const matrix3x4_t *pBoneToWorld, int nFlexWeightCount, float *pFlexWeights, float *pFlexDelayedWeights );
virtual void ImpactTrace( trace_t *pTrace, int iDamageType, char *pCustomImpactName );
virtual void ImpactTrace( trace_t *pTrace, int iDamageType, const char *pCustomImpactName );
void ClientThink( void );
void ReleaseRagdoll( void ) { m_bReleaseRagdoll = true; }
bool ShouldSavePhysics( void ) { return true; }
Expand Down
6 changes: 3 additions & 3 deletions src/game/client/c_baseentity.h
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ class C_BaseEntity : public IClientEntity

// ID Target handling
virtual bool IsValidIDTarget( void ) { return false; }
virtual char *GetIDString( void ) { return ""; };
virtual const char *GetIDString( void ) { return ""; };

// See CSoundEmitterSystem
void EmitSound( const char *soundname, float soundtime = 0.0f, float *duration = NULL ); // Override for doing the general case of CPASAttenuationFilter( this ), and EmitSound( filter, entindex(), etc. );
Expand Down Expand Up @@ -899,7 +899,7 @@ class C_BaseEntity : public IClientEntity

virtual char const * DamageDecal( int bitsDamageType, int gameMaterial );
virtual void DecalTrace( trace_t *pTrace, char const *decalName );
virtual void ImpactTrace( trace_t *pTrace, int iDamageType, char *pCustomImpactName );
virtual void ImpactTrace( trace_t *pTrace, int iDamageType, const char *pCustomImpactName );

virtual bool ShouldPredict( void ) { return false; };
// interface function pointers
Expand Down Expand Up @@ -1255,7 +1255,7 @@ class C_BaseEntity : public IClientEntity
#ifdef _DEBUG
void FunctionCheck( void *pFunction, const char *name );

ENTITYFUNCPTR TouchSet( ENTITYFUNCPTR func, char *name )
ENTITYFUNCPTR TouchSet( ENTITYFUNCPTR func, const char *name )
{
//COMPILE_TIME_ASSERT( sizeof(func) == 4 );
m_pfnTouch = func;
Expand Down
4 changes: 2 additions & 2 deletions src/game/client/c_baseflex.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===== Copyright � 1996-2005, Valve Corporation, All rights reserved. ======//
//===== Copyright © 1996-2005, Valve Corporation, All rights reserved. ======//
//
// Purpose:
//
Expand Down Expand Up @@ -1384,7 +1384,7 @@ int C_BaseFlex::g_numflexcontrollers;
char * C_BaseFlex::g_flexcontroller[MAXSTUDIOFLEXCTRL*4];
float C_BaseFlex::s_pGlobalFlexWeight[MAXSTUDIOFLEXCTRL*4];

int C_BaseFlex::AddGlobalFlexController( char *szName )
int C_BaseFlex::AddGlobalFlexController( const char *szName )
{
int i;
for (i = 0; i < g_numflexcontrollers; i++)
Expand Down
4 changes: 2 additions & 2 deletions src/game/client/c_baseflex.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===== Copyright � 1996-2005, Valve Corporation, All rights reserved. ======//
//===== Copyright © 1996-2005, Valve Corporation, All rights reserved. ======//
//
// Purpose:
//
Expand Down Expand Up @@ -92,7 +92,7 @@ class C_BaseFlex : public C_BaseAnimatingOverlay

int m_blinktoggle;

static int AddGlobalFlexController( char *szName );
static int AddGlobalFlexController( const char *szName );
static char const *GetGlobalFlexControllerName( int idx );

// bah, this should be unified with all prev/current stuff.
Expand Down
4 changes: 2 additions & 2 deletions src/game/client/c_baselesson.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright � 1996-2008, Valve Corporation, All rights reserved. ============//
//========= Copyright © 1996-2008, Valve Corporation, All rights reserved. ============//
//
// Purpose: Client handler implementations for instruction players how to play
//
Expand Down Expand Up @@ -1695,7 +1695,7 @@ void CScriptedIconLesson::InitElementsFromKeys( CUtlVector< LessonElement_t > *p
pchToken = strtok( szSubKeyName, " " );
_fieldtypes paramType = LessonParamTypeFromString( pchToken );

char *pchParam = "";
const char *pchParam = "";

if ( paramType != FIELD_VOID )
{
Expand Down
2 changes: 1 addition & 1 deletion src/game/client/c_baseplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2170,7 +2170,7 @@ void C_BasePlayer::PlayPlayerJingle()
}

// Stuff for prediction
void C_BasePlayer::SetSuitUpdate(char *name, int fgroup, int iNoRepeat)
void C_BasePlayer::SetSuitUpdate(const char *name, int fgroup, int iNoRepeat)
{
// FIXME: Do something here?
}
Expand Down
4 changes: 2 additions & 2 deletions src/game/client/c_baseplayer.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===== Copyright � 1996-2005, Valve Corporation, All rights reserved. ======//
//===== Copyright © 1996-2005, Valve Corporation, All rights reserved. ======//
//
// Purpose: Client-side CBasePlayer.
//
Expand Down Expand Up @@ -126,7 +126,7 @@ class C_BasePlayer : public C_BaseCombatCharacter
virtual void Weapon_DropPrimary( void ) {}

virtual Vector GetAutoaimVector( float flScale );
void SetSuitUpdate(char *name, int fgroup, int iNoRepeat);
void SetSuitUpdate(const char *name, int fgroup, int iNoRepeat);

// Input handling
virtual bool CreateMove( float flInputSampleTime, CUserCmd *pCmd );
Expand Down
22 changes: 11 additions & 11 deletions src/game/client/c_effects.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===== Copyright � 1996-2005, Valve Corporation, All rights reserved. ======//
//===== Copyright © 1996-2005, Valve Corporation, All rights reserved. ======//
//
// Purpose:
//
Expand Down Expand Up @@ -986,7 +986,7 @@ void CClient_Precipitation::CreateParticlePrecip( void )
{
FOR_EACH_VALID_SPLITSCREEN_PLAYER( hh )
{
if ( m_pParticlePrecipOuter[hh] != NULL )
if ( m_pParticlePrecipOuter[hh].IsValid() )
{
DestroyInnerParticlePrecip( hh );
DestroyOuterParticlePrecip( hh );
Expand Down Expand Up @@ -1106,7 +1106,7 @@ void CClient_Precipitation::UpdateParticlePrecip( C_BasePlayer *pPlayer, int nSl
//debugoverlay->AddBoxOverlay(vOffsetPosFar, Vector( -5, -5, -5 ), Vector( 5, 5, 5 ), QAngle( 0, 0, 0 ), 0, 0, 255, 32, 0.2f );

// Update if we've already got systems, otherwise, create them.
if ( m_pParticlePrecipInnerNear[nSlot] != NULL && m_pParticlePrecipInnerFar[nSlot] != NULL && m_pParticlePrecipOuter[nSlot] != NULL )
if ( m_pParticlePrecipInnerNear[nSlot].IsValid() && m_pParticlePrecipInnerFar[nSlot].IsValid() && m_pParticlePrecipOuter[nSlot].IsValid() )
{
m_pParticlePrecipOuter[nSlot]->SetControlPoint( 1, vOffsetPos );
m_pParticlePrecipInnerNear[nSlot]->SetControlPoint( 1, vOffsetPosNear );
Expand All @@ -1124,12 +1124,12 @@ void CClient_Precipitation::UpdateParticlePrecip( C_BasePlayer *pPlayer, int nSl
if ( !bInside && SubFloat( FindLowestSIMD3( Result.HitDistance ), 0 ) >= m_flParticleInnerDist )
{
// Kill the inner rain if it's previously been in use
if ( m_pParticlePrecipInnerNear[nSlot] != NULL )
if ( m_pParticlePrecipInnerNear[nSlot].IsValid() )
{
DestroyInnerParticlePrecip( nSlot );
}
// Update if we've already got systems, otherwise, create them.
if ( m_pParticlePrecipOuter[nSlot] != NULL )
if ( m_pParticlePrecipOuter[nSlot].IsValid() )
{
m_pParticlePrecipOuter[nSlot]->SetControlPoint( 1, vOffsetPos );
m_pParticlePrecipOuter[nSlot]->SetControlPoint( 3, vDensity );
Expand All @@ -1142,7 +1142,7 @@ void CClient_Precipitation::UpdateParticlePrecip( C_BasePlayer *pPlayer, int nSl
else //We're close enough to use the near effect.
{
// Update if we've already got systems, otherwise, create them.
if ( m_pParticlePrecipInnerNear[nSlot] != NULL && m_pParticlePrecipInnerFar[nSlot] != NULL && m_pParticlePrecipOuter[nSlot] != NULL )
if ( m_pParticlePrecipInnerNear[nSlot].IsValid() && m_pParticlePrecipInnerFar[nSlot].IsValid() && m_pParticlePrecipOuter[nSlot].IsValid() )
{
m_pParticlePrecipOuter[nSlot]->SetControlPoint( 1, vOffsetPos );
m_pParticlePrecipInnerNear[nSlot]->SetControlPoint( 1, vOffsetPosNear );
Expand Down Expand Up @@ -1274,12 +1274,12 @@ void CClient_Precipitation::InitializeParticlePrecip( void )

void CClient_Precipitation::DestroyInnerParticlePrecip( int nSlot )
{
if ( m_pParticlePrecipInnerFar[nSlot] != NULL )
if ( m_pParticlePrecipInnerFar[nSlot].IsValid() )
{
m_pParticlePrecipInnerFar[nSlot]->StopEmission();
m_pParticlePrecipInnerFar[nSlot] = NULL;
}
if ( m_pParticlePrecipInnerNear[nSlot] != NULL )
if ( m_pParticlePrecipInnerNear[nSlot].IsValid() )
{
m_pParticlePrecipInnerNear[nSlot]->StopEmission();
m_pParticlePrecipInnerNear[nSlot] = NULL;
Expand All @@ -1288,7 +1288,7 @@ void CClient_Precipitation::DestroyInnerParticlePrecip( int nSlot )

void CClient_Precipitation::DestroyOuterParticlePrecip( int nSlot )
{
if ( m_pParticlePrecipOuter[nSlot] != NULL )
if ( m_pParticlePrecipOuter[nSlot].IsValid() )
{
m_pParticlePrecipOuter[nSlot]->StopEmission();
m_pParticlePrecipOuter[nSlot] = NULL;
Expand Down Expand Up @@ -2020,7 +2020,7 @@ class CSnowFallManager : public C_BaseEntity
void CreateSnowFallParticle( const Vector &vecParticleSpawn, int iBBox, C_BasePlayer *pLocalPlayer );

int StandingInSnowVolume( Vector &vecPoint );
void FindSnowVolumes( Vector &vecCenter, float flRadius, Vector &vecEyePos, Vector &vecForward );
void FindSnowVolumes( Vector &vecCenter, float flRadius, const Vector &vecEyePos, Vector &vecForward );

void UpdateBounds( const Vector &vecSnowMin, const Vector &vecSnowMax );

Expand Down Expand Up @@ -2225,7 +2225,7 @@ int CSnowFallManager::StandingInSnowVolume( Vector &vecPoint )
// Input : &vecCenter -
// flRadius -
//-----------------------------------------------------------------------------
void CSnowFallManager::FindSnowVolumes( Vector &vecCenter, float flRadius, Vector &vecEyePos, Vector &vecForward )
void CSnowFallManager::FindSnowVolumes( Vector &vecCenter, float flRadius, const Vector &vecEyePos, Vector &vecForward )
{
// Reset.
m_nActiveSnowCount = 0;
Expand Down
8 changes: 4 additions & 4 deletions src/game/client/c_effects.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
Expand Down Expand Up @@ -192,9 +192,9 @@ class CClient_Precipitation : public C_BaseEntity
AshSplit_t m_Ash[ MAX_SPLITSCREEN_PLAYERS ];

float m_flParticleInnerDist; //The distance at which to start drawing the inner system
char *m_pParticleInnerNearDef; //Name of the first inner system
char *m_pParticleInnerFarDef; //Name of the second inner system
char *m_pParticleOuterDef; //Name of the outer system
const char *m_pParticleInnerNearDef; //Name of the first inner system
const char *m_pParticleInnerFarDef; //Name of the second inner system
const char *m_pParticleOuterDef; //Name of the outer system
HPARTICLEFFECT m_pParticlePrecipInnerNear[ MAX_SPLITSCREEN_PLAYERS ];
HPARTICLEFFECT m_pParticlePrecipInnerFar[ MAX_SPLITSCREEN_PLAYERS ];
HPARTICLEFFECT m_pParticlePrecipOuter[ MAX_SPLITSCREEN_PLAYERS ];
Expand Down
4 changes: 2 additions & 2 deletions src/game/client/c_spatialentity.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===== Copyright � 1996-2005, Valve Corporation, All rights reserved. ======//
//===== Copyright © 1996-2005, Valve Corporation, All rights reserved. ======//
//
// Purpose: Spatial entity with simple radial falloff
//
Expand Down Expand Up @@ -133,7 +133,7 @@ template <class T>
float C_SpatialEntityTemplate<T>::m_ForcedInfluence;

template <>
void C_SpatialEntityTemplate<Vector>::ResetAccumulation( void )
inline void C_SpatialEntityTemplate<Vector>::ResetAccumulation( void )
{
m_AccumulatedValue.Init();
m_ForcedValue.Init();
Expand Down
Loading