Skip to content
Closed
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
6 changes: 3 additions & 3 deletions src/common/language.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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/common/xbox/xboxstubs.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ typedef unsigned __int64 ULONGLONG;
typedef int32 COLORREF;
#endif

#ifndef INVALID_HANDLE_VALUE
#if !defined( _WIN32 ) && !defined( INVALID_HANDLE_VALUE )
#define INVALID_HANDLE_VALUE ((HANDLE)-1)
#endif

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/beamdraw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -832,8 +832,8 @@ void DrawSplineSegs( int noise_divisions, float *prgNoise,
}
else if ( flags & FBEAM_SHADEOUT )
{
float fadeFraction = fadeLength/length;
brightness = 1.0 - (fraction/fadeFraction);
float flFadeFraction = fadeLength/length;
brightness = 1.0 - (fraction/flFadeFraction);
if (brightness < 0)
{
brightness = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/game/client/bone_merge_cache.cpp
Original file line number Diff line number Diff line change
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
40 changes: 20 additions & 20 deletions src/game/client/c_baseanimating.cpp
Original file line number Diff line number Diff line change
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 Expand Up @@ -2501,15 +2501,15 @@ void C_BaseAnimating::CalculateIKLocks( float currentTime )
partition->SuppressLists( curSuppressed, true );
}

bool C_BaseAnimating::GetPoseParameterRange( int index, float &minValue, float &maxValue )
bool C_BaseAnimating::GetPoseParameterRange( int iIndex, float &minValue, float &maxValue )
{
CStudioHdr *pStudioHdr = GetModelPtr();

if (pStudioHdr)
{
if (index >= 0 && index < pStudioHdr->GetNumPoseParameters())
if (iIndex >= 0 && iIndex < pStudioHdr->GetNumPoseParameters())
{
const mstudioposeparamdesc_t &pose = pStudioHdr->pPoseParameter( index );
const mstudioposeparamdesc_t &pose = pStudioHdr->pPoseParameter( iIndex );
minValue = pose.start;
maxValue = pose.end;
return true;
Expand All @@ -2532,9 +2532,9 @@ void C_BaseAnimating::ControlMouth( CStudioHdr *pstudiohdr )
if ( !pstudiohdr )
return;

int index = LookupPoseParameter( pstudiohdr, LIPSYNC_POSEPARAM_NAME );
int iIndex = LookupPoseParameter( pstudiohdr, LIPSYNC_POSEPARAM_NAME );

if ( index != -1 )
if ( iIndex != -1 )
{
float value = GetMouth()->mouthopen / 64.0;

Expand All @@ -2544,15 +2544,15 @@ void C_BaseAnimating::ControlMouth( CStudioHdr *pstudiohdr )
value = 1.0;

float start, end;
GetPoseParameterRange( index, start, end );
GetPoseParameterRange( iIndex, start, end );

value = (1.0 - value) * start + value * end;

//Adrian - Set the pose parameter value.
//It has to be called "mouth".
SetPoseParameter( pstudiohdr, index, value );
SetPoseParameter( pstudiohdr, iIndex, value );
// Reset interpolation here since the client is controlling this rather than the server...
m_iv_flPoseParameter.SetHistoryValuesForItem( index, raw );
m_iv_flPoseParameter.SetHistoryValuesForItem( iIndex, raw );
}
}

Expand Down Expand Up @@ -4256,20 +4256,20 @@ void C_BaseAnimating::FireEvent( const Vector& origin, const QAngle& angles, int

case AE_CL_ENABLE_BODYGROUP:
{
int index = FindBodygroupByName( options );
if ( index >= 0 )
int iIndex = FindBodygroupByName( options );
if ( iIndex >= 0 )
{
SetBodygroup( index, 1 );
SetBodygroup( iIndex, 1 );
}
}
break;

case AE_CL_DISABLE_BODYGROUP:
{
int index = FindBodygroupByName( options );
if ( index >= 0 )
int iIndex = FindBodygroupByName( options );
if ( iIndex >= 0 )
{
SetBodygroup( index, 0 );
SetBodygroup( iIndex, 0 );
}
}
break;
Expand Down Expand Up @@ -4299,10 +4299,10 @@ void C_BaseAnimating::FireEvent( const Vector& origin, const QAngle& angles, int
value = atoi( token );
}

int index = FindBodygroupByName( szBodygroupName );
if ( index >= 0 )
int iIndex = FindBodygroupByName( szBodygroupName );
if ( iIndex >= 0 )
{
SetBodygroup( index, value );
SetBodygroup( iIndex, value );
}
}
break;
Expand Down Expand Up @@ -4963,8 +4963,8 @@ C_BaseAnimating *C_BaseAnimating::CreateRagdollCopy()

TermRopes();

const model_t *model = GetModel();
const char *pModelName = modelinfo->GetModelName( model );
const model_t *pModel = GetModel();
const char *pModelName = modelinfo->GetModelName( pModel );

if ( pRagdoll->InitializeAsClientEntity( pModelName, false ) == false )
{
Expand Down
4 changes: 2 additions & 2 deletions src/game/client/c_baseanimating.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class CAttachmentData
QAngle m_angRotation;
Vector m_vOriginVelocity;
int m_nLastFramecount : 31;
int m_bAnglesComputed : 1;
unsigned int m_bAnglesComputed : 1;
};


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
2 changes: 1 addition & 1 deletion src/game/client/c_baseanimatingoverlay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ void C_BaseAnimatingOverlay::CheckForLayerChanges( CStudioHdr *hdr, float curren
int i;
for (i = 0; i < m_iv_AnimOverlay.Count(); i++)
{
CDisableRangeChecks disableRangeChecks;
CDisableRangeChecks disableRangeChecks2;

int iHead, iPrev1, iPrev2;
m_iv_AnimOverlay[i].GetInterpolationInfo( currentTime, &iHead, &iPrev1, &iPrev2 );
Expand Down
10 changes: 5 additions & 5 deletions src/game/client/c_baseentity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ void C_BaseEntity::RecvProxy_CellOrigin( const CRecvProxyData *pData, void *pStr

if ( pEnt->ShouldRegenerateOriginFromCellBits() )
{
register int const cellwidth = pEnt->m_cellwidth; // Load it into a register
int const cellwidth = pEnt->m_cellwidth; // Load it into a register
vecNetworkOrigin->x = CoordFromCell( cellwidth, pEnt->m_cellX, pData->m_Value.m_Vector[0] );
vecNetworkOrigin->y = CoordFromCell( cellwidth, pEnt->m_cellY, pData->m_Value.m_Vector[1] );
vecNetworkOrigin->z = CoordFromCell( cellwidth, pEnt->m_cellZ, pData->m_Value.m_Vector[2] );
Expand All @@ -424,7 +424,7 @@ void C_BaseEntity::RecvProxy_CellOriginXY( const CRecvProxyData *pData, void *pS
pEnt->m_vecCellOrigin.x = pData->m_Value.m_Vector[0];
pEnt->m_vecCellOrigin.y = pData->m_Value.m_Vector[1];

register int const cellwidth = pEnt->m_cellwidth; // Load it into a register
int const cellwidth = pEnt->m_cellwidth; // Load it into a register

if ( pEnt->ShouldRegenerateOriginFromCellBits() )
{
Expand All @@ -443,7 +443,7 @@ void C_BaseEntity::RecvProxy_CellOriginZ( const CRecvProxyData *pData, void *pSt

pEnt->m_vecCellOrigin.z = pData->m_Value.m_Float;

register int const cellwidth = pEnt->m_cellwidth; // Load it into a register
int const cellwidth = pEnt->m_cellwidth; // Load it into a register

if ( pEnt->ShouldRegenerateOriginFromCellBits() )
{
Expand Down Expand Up @@ -2068,9 +2068,9 @@ int C_BaseEntity::GetModelIndex( void ) const
// Purpose:
// Input : index -
//-----------------------------------------------------------------------------
void C_BaseEntity::SetModelIndex( int index )
void C_BaseEntity::SetModelIndex( int iIndex )
{
m_nModelIndex = index;
m_nModelIndex = iIndex;
const model_t *pModel = modelinfo->GetModel( m_nModelIndex );
SetModelPointer( pModel );
}
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
Loading