Skip to content

Commit 6305723

Browse files
committed
! rename index -> m_index
1 parent aadfc0c commit 6305723

4 files changed

Lines changed: 20 additions & 20 deletions

File tree

src/game/client/c_baseentity.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,7 @@ void C_BaseEntity::Clear( void )
11391139
m_hThink = INVALID_THINK_HANDLE;
11401140
m_AimEntsListHandle = INVALID_AIMENTS_LIST_HANDLE;
11411141

1142-
index = -1;
1142+
m_index = -1;
11431143
m_Collision.Init( this );
11441144
CleanUpAlphaProperty();
11451145
m_pClientAlphaProperty = static_cast< CClientAlphaProperty * >( g_pClientAlphaPropertyMgr->CreateClientAlphaProperty( this ) );
@@ -1237,8 +1237,8 @@ bool C_BaseEntity::Init( int entnum, int iSerialNum )
12371237
{
12381238
Assert( entnum >= 0 && entnum < NUM_ENT_ENTRIES );
12391239

1240-
index = entnum;
1241-
m_pClientAlphaProperty->SetDesyncOffset( index );
1240+
m_index = entnum;
1241+
m_pClientAlphaProperty->SetDesyncOffset( m_index );
12421242

12431243
cl_entitylist->AddNetworkableEntity( GetIClientUnknown(), entnum, iSerialNum );
12441244

@@ -1301,7 +1301,7 @@ bool C_BaseEntity::InitializeAsClientEntityByIndex( int iIndex, bool bRenderWith
13011301
// Add the client entity to the spatial partition. (Collidable)
13021302
CollisionProp()->CreatePartitionHandle();
13031303

1304-
index = -1;
1304+
m_index = -1;
13051305
m_pClientAlphaProperty->SetDesyncOffset( rand() % 1024 );
13061306

13071307
SpawnClientEntity();
@@ -1350,7 +1350,7 @@ void C_BaseEntity::Term()
13501350
CollisionProp()->DestroyPartitionHandle();
13511351

13521352
// If Client side only entity index will be -1
1353-
if ( index != -1 )
1353+
if ( m_index != -1 )
13541354
{
13551355
beams->KillDeadBeams( this );
13561356
}
@@ -1703,7 +1703,7 @@ bool C_BaseEntity::ShouldDraw()
17031703
return false;
17041704
}
17051705

1706-
return (model != 0) && !IsEffectActive(EF_NODRAW) && (index != 0);
1706+
return (model != 0) && !IsEffectActive(EF_NODRAW) && (m_index != 0);
17071707
}
17081708

17091709
bool C_BaseEntity::TestCollision( const Ray_t& ray, unsigned int mask, trace_t& trace )
@@ -1891,7 +1891,7 @@ IClientRenderable *C_BaseEntity::NextShadowPeer()
18911891
//-----------------------------------------------------------------------------
18921892
int C_BaseEntity::entindex( void ) const
18931893
{
1894-
return index;
1894+
return m_index;
18951895
}
18961896

18971897
int C_BaseEntity::GetSoundSourceIndex() const
@@ -2833,7 +2833,7 @@ void C_BaseEntity::PostDataUpdate( DataUpdateType_t updateType )
28332833
}
28342834

28352835
// If it's the world, force solid flags
2836-
if ( index == 0 )
2836+
if ( m_index == 0 )
28372837
{
28382838
m_nModelIndex = 1;
28392839
SetSolid( SOLID_BSP );
@@ -3285,7 +3285,7 @@ bool C_BaseEntity::CreateLightEffects( void )
32853285
if (IsEffectActive(EF_BRIGHTLIGHT))
32863286
{
32873287
bHasLightEffects = true;
3288-
dl = effects->CL_AllocDlight ( index );
3288+
dl = effects->CL_AllocDlight ( m_index );
32893289
dl->origin = GetAbsOrigin();
32903290
dl->origin[2] += 16;
32913291
dl->color.r = dl->color.g = dl->color.b = 250;
@@ -3295,7 +3295,7 @@ bool C_BaseEntity::CreateLightEffects( void )
32953295
if (IsEffectActive(EF_DIMLIGHT))
32963296
{
32973297
bHasLightEffects = true;
3298-
dl = effects->CL_AllocDlight ( index );
3298+
dl = effects->CL_AllocDlight ( m_index );
32993299
dl->origin = GetAbsOrigin();
33003300
dl->color.r = dl->color.g = dl->color.b = 100;
33013301
dl->radius = random->RandomFloat(200,231);
@@ -3319,7 +3319,7 @@ bool C_BaseEntity::ShouldInterpolate()
33193319
if ( IsViewEntity() )
33203320
return true;
33213321

3322-
if ( index == 0 || !GetModel() )
3322+
if ( m_index == 0 || !GetModel() )
33233323
return false;
33243324

33253325
// always interpolate if visible
@@ -3607,7 +3607,7 @@ void C_BaseEntity::OnDataChanged( DataUpdateType_t type )
36073607

36083608
// These may have changed in the network update
36093609
AlphaProp()->SetRenderFX( GetRenderFX(), GetRenderMode() );
3610-
AlphaProp()->SetDesyncOffset( index );
3610+
AlphaProp()->SetDesyncOffset( m_index );
36113611

36123612
// Copy in fade parameters
36133613
AlphaProp()->SetFade( m_flFadeScale, m_fadeMinDist, m_fadeMaxDist );
@@ -3738,7 +3738,7 @@ void C_BaseEntity::AddBrushModelDecal( const Ray_t& ray, const Vector& decalCent
37383738
vecNormal *= -1.0f;
37393739
}
37403740

3741-
effects->DecalShoot( decalIndex, index,
3741+
effects->DecalShoot( decalIndex, m_index,
37423742
model, GetAbsOrigin(), GetAbsAngles(), decalCenter, NULL, 0, &vecNormal );
37433743
}
37443744

@@ -4045,7 +4045,7 @@ void C_BaseEntity::SetDormant( bool bDormant )
40454045
ParticleProp()->OwnerSetDormantTo( bDormant );
40464046

40474047
OnSetDormant( bDormant );
4048-
cl_entitylist->SetDormant(index, bDormant);
4048+
cl_entitylist->SetDormant(m_index, bDormant);
40494049
}
40504050

40514051
//-----------------------------------------------------------------------------

src/game/client/c_baseentity.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1387,7 +1387,7 @@ class C_BaseEntity : public IClientEntity
13871387
public:
13881388

13891389
// Determine what entity this corresponds to
1390-
int index;
1390+
int m_index;
13911391

13921392
// Entity flags that are only for the client (ENTCLIENTFLAG_ defines).
13931393
unsigned short m_EntClientFlags;
@@ -1908,7 +1908,7 @@ inline const CParticleProperty *C_BaseEntity::ParticleProp() const
19081908
//-----------------------------------------------------------------------------
19091909
inline bool C_BaseEntity::IsServerEntity( void )
19101910
{
1911-
return index != -1;
1911+
return m_index != -1;
19121912
}
19131913

19141914
//-----------------------------------------------------------------------------

src/game/client/swarm/clientmode_asw.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,7 @@ void ClientModeASW::FireGameEvent( IGameEvent *event )
806806

807807
for ( C_BaseEntity *pEntity = ClientEntityList().FirstBaseEntity(); pEntity; pEntity = ClientEntityList().NextBaseEntity( pEntity ) )
808808
{
809-
if ( pEntity->index != -1 )
809+
if ( pEntity->m_index != -1 )
810810
continue;
811811

812812
if ( C_ClientRagdoll *pRagdoll = dynamic_cast<C_ClientRagdoll *>( pEntity ) )

src/game/shared/predictioncopy_helpers.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ void CValueChangeTracker::SetupTracking( C_BaseEntity *ent, char const *pchField
186186
datamap_t *dmap = ent->GetPredDescMap();
187187
if ( !dmap )
188188
{
189-
Msg( "No prediction datamap_t for entity %d/%s\n", ent->index, ent->GetClassname() );
189+
Msg( "No prediction datamap_t for entity %d/%s\n", ent->m_index, ent->GetClassname() );
190190
return;
191191
}
192192

@@ -195,7 +195,7 @@ void CValueChangeTracker::SetupTracking( C_BaseEntity *ent, char const *pchField
195195
m_pTrackField = CPredictionCopy::FindFlatFieldByName( pchFieldName, dmap );
196196
if ( !m_pTrackField )
197197
{
198-
Msg( "No field '%s' in datamap_t for entity %d/%s\n", pchFieldName, ent->index, ent->GetClassname() );
198+
Msg( "No field '%s' in datamap_t for entity %d/%s\n", pchFieldName, ent->m_index, ent->GetClassname() );
199199
return;
200200
}
201201

@@ -252,4 +252,4 @@ CON_COMMAND_F( cl_pred_track, "<entindex> <fieldname>: Track changes to entity
252252
g_pChangeTracker->SetupTracking( ent, args[2] );
253253
}
254254

255-
#endif // NO_ENTITY_PREDICTION
255+
#endif // NO_ENTITY_PREDICTION

0 commit comments

Comments
 (0)