Skip to content

Commit 5bb5cad

Browse files
committed
! fix m_index
1 parent 6305723 commit 5bb5cad

21 files changed

Lines changed: 51 additions & 51 deletions

src/game/client/c_baseanimating.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2741,7 +2741,7 @@ bool C_BaseAnimating::SetupBones( matrix3x4a_t *pBoneToWorldOut, int nMaxBones,
27412741
// Prevent spammage!!!
27422742
if ( gpGlobals->realtime >= lastWarning + 1.0f )
27432743
{
2744-
DevMsgRT( "*** ERROR: Bone access not allowed (entity %i:%s)\n", index, GetClassname() );
2744+
DevMsgRT( "*** ERROR: Bone access not allowed (entity %i:%s)\n", m_index, GetClassname() );
27452745
lastWarning = gpGlobals->realtime;
27462746
}
27472747
}
@@ -3504,7 +3504,7 @@ int C_BaseAnimating::InternalDrawModel( int flags, const RenderableInstance_t &i
35043504
pInfo->flags = flags;
35053505
pInfo->pRenderable = this;
35063506
pInfo->instance = GetModelInstance();
3507-
pInfo->entity_index = index;
3507+
pInfo->entity_index = m_index;
35083508
pInfo->pModel = GetModel();
35093509
pInfo->origin = GetRenderOrigin();
35103510
pInfo->angles = GetRenderAngles();
@@ -3579,7 +3579,7 @@ void C_BaseAnimating::ProcessMuzzleFlashEvent()
35793579
GetAttachment( 1, vAttachment, dummyAngles );
35803580

35813581
// Make an elight
3582-
dlight_t *el = effects->CL_AllocElight( LIGHT_INDEX_MUZZLEFLASH + index );
3582+
dlight_t *el = effects->CL_AllocElight( LIGHT_INDEX_MUZZLEFLASH + m_index );
35833583
el->origin = vAttachment;
35843584
el->radius = random->RandomInt( 32, 64 );
35853585
el->decay = el->radius / 0.05f;

src/game/client/c_baseplayer.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ void C_BasePlayer::CheckForLocalPlayer( int nSplitScreenSlot )
688688
if ( g_nKillCamMode )
689689
iLocalPlayerIndex = g_nKillCamTarget1;
690690

691-
if ( iLocalPlayerIndex == index )
691+
if ( iLocalPlayerIndex == m_index )
692692
{
693693
Assert( s_pLocalPlayer[ nSplitScreenSlot ] == NULL );
694694
s_pLocalPlayer[ nSplitScreenSlot ] = this;
@@ -737,7 +737,7 @@ void C_BasePlayer::PostDataUpdate( DataUpdateType_t updateType )
737737
FOR_EACH_VALID_SPLITSCREEN_PLAYER( i )
738738
{
739739
int nIndex = engine->GetSplitScreenPlayer( i );
740-
if ( nIndex == index )
740+
if ( nIndex == m_index )
741741
{
742742
nSlot = i;
743743
break;
@@ -1181,7 +1181,7 @@ void C_BasePlayer::UpdateFlashlight()
11811181

11821182
if ( pFlashlightPlayer )
11831183
{
1184-
FlashlightEffectManager().SetEntityIndex( pFlashlightPlayer->index );
1184+
FlashlightEffectManager().SetEntityIndex( pFlashlightPlayer->m_index );
11851185
}
11861186

11871187
// The dim light is the flashlight.
@@ -1194,12 +1194,12 @@ void C_BasePlayer::UpdateFlashlight()
11941194
// Turned on the headlight; create it.
11951195
if ( pszTextureName )
11961196
{
1197-
FlashlightEffectManager().TurnOnFlashlight( pFlashlightPlayer->index, pszTextureName, pFlashlightPlayer->GetFlashlightFOV(),
1197+
FlashlightEffectManager().TurnOnFlashlight( pFlashlightPlayer->m_index, pszTextureName, pFlashlightPlayer->GetFlashlightFOV(),
11981198
pFlashlightPlayer->GetFlashlightFarZ(), pFlashlightPlayer->GetFlashlightLinearAtten() );
11991199
}
12001200
else
12011201
{
1202-
FlashlightEffectManager().TurnOnFlashlight( pFlashlightPlayer->index );
1202+
FlashlightEffectManager().TurnOnFlashlight( pFlashlightPlayer->m_index );
12031203
}
12041204
m_bFlashlightEnabled[ iSsPlayer ] = true;
12051205
}

src/game/client/c_beamspotlight.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,9 +337,9 @@ void C_BeamSpotLight::ComputeRenderInfo()
337337
return;
338338

339339
// Deal with the environment light
340-
if ( !m_pDynamicLight || (m_pDynamicLight->key != index) )
340+
if ( !m_pDynamicLight || (m_pDynamicLight->key != m_index) )
341341
{
342-
m_pDynamicLight = effects->CL_AllocDlight( index );
342+
m_pDynamicLight = effects->CL_AllocDlight( m_index );
343343
assert (m_pDynamicLight);
344344
}
345345

src/game/client/c_dynamiclight.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,14 @@ void C_DynamicLight::ClientThink(void)
134134
if ( (m_Flags & DLIGHT_NO_MODEL_ILLUMINATION) == 0 )
135135
{
136136
// Deal with the model light
137-
if ( !m_pDynamicLight || (m_pDynamicLight->key != index) )
137+
if ( !m_pDynamicLight || (m_pDynamicLight->key != m_index) )
138138
{
139139
#if DLIGHT_NO_WORLD_USES_ELIGHT
140140
m_pDynamicLight = ShouldBeElight() != 0
141-
? effects->CL_AllocElight( index )
142-
: effects->CL_AllocDlight( index );
141+
? effects->CL_AllocElight( m_index )
142+
: effects->CL_AllocDlight( m_index );
143143
#else
144-
m_pDynamicLight = effects->CL_AllocDlight( index );
144+
m_pDynamicLight = effects->CL_AllocDlight( m_index );
145145
#endif
146146
Assert (m_pDynamicLight);
147147
m_pDynamicLight->minlight = 0;
@@ -181,9 +181,9 @@ void C_DynamicLight::ClientThink(void)
181181
{
182182
// Raycast to where the endpoint goes
183183
// Deal with the environment light
184-
if ( !m_pSpotlightEnd || (m_pSpotlightEnd->key != -index) )
184+
if ( !m_pSpotlightEnd || (m_pSpotlightEnd->key != -m_index) )
185185
{
186-
m_pSpotlightEnd = effects->CL_AllocDlight( -index );
186+
m_pSpotlightEnd = effects->CL_AllocDlight( -m_index );
187187
Assert (m_pSpotlightEnd);
188188
}
189189

src/game/client/c_entityflame.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ bool C_EntityFlame::Simulate( void )
131131
#ifdef HL2_EPISODIC
132132
if ( IsEffectActive(EF_BRIGHTLIGHT) || IsEffectActive(EF_DIMLIGHT) )
133133
{
134-
dlight_t *dl = effects->CL_AllocDlight( index );
134+
dlight_t *dl = effects->CL_AllocDlight( m_index );
135135
dl->origin = GetAbsOrigin();
136136
dl->origin[2] += 16;
137137
dl->color.r = 254;

src/game/client/c_plasma.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ void C_Plasma::Start( void )
342342
m_entFlames[i].SetRenderColor( 255, 255, 255 );
343343
m_entFlames[i].SetRenderAlpha( 255 );
344344
m_entFlames[i].SetBrightness( 255 );
345-
m_entFlames[i].index = -1;
345+
m_entFlames[i].m_index = -1;
346346

347347
if ( i == 0 )
348348
{
@@ -364,7 +364,7 @@ void C_Plasma::Start( void )
364364
m_entGlow.SetRenderColor( 255, 255, 255 );
365365
m_entGlow.SetRenderAlpha( 255 );
366366
m_entGlow.SetBrightness( 255 );
367-
m_entGlow.index = -1;
367+
m_entGlow.m_index = -1;
368368

369369
m_flGlowScale = m_flStartScale;
370370

src/game/client/c_recipientfilter.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ void C_RecipientFilter::AddRecipient( C_BasePlayer *player )
9595
if ( !player )
9696
return;
9797

98-
int index = player->index;
98+
int index = player->m_index;
9999

100100
// If we're predicting and this is not the first time we've predicted this sound
101101
// then don't send it to the local player again.
@@ -127,7 +127,7 @@ void C_RecipientFilter::RemoveRecipient( C_BasePlayer *player )
127127
if ( !player )
128128
return;
129129

130-
int index = player->index;
130+
int index = player->m_index;
131131

132132
// Remove it if it's in the list
133133
m_Recipients.FindAndRemove( index );
@@ -153,7 +153,7 @@ void C_RecipientFilter::AddPlayersFromBitMask( CPlayerBitVec& playerbits )
153153
continue;
154154

155155
// only add the local player on client side
156-
if ( !playerbits[ pPlayer->index ] )
156+
if ( !playerbits[ pPlayer->m_index ] )
157157
continue;
158158

159159
AddRecipient( pPlayer );

src/game/client/c_spotlight_end.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ void C_SpotlightEnd::ClientThink(void)
111111
return;
112112

113113
// Deal with the environment light
114-
if ( !m_pDynamicLight || (m_pDynamicLight->key != index) )
114+
if ( !m_pDynamicLight || (m_pDynamicLight->key != m_index) )
115115
{
116-
m_pDynamicLight = effects->CL_AllocDlight( index );
116+
m_pDynamicLight = effects->CL_AllocDlight( m_index );
117117
assert (m_pDynamicLight);
118118
}
119119

@@ -128,9 +128,9 @@ void C_SpotlightEnd::ClientThink(void)
128128
VectorCopy (m_vSpotlightDir, m_pDynamicLight->m_Direction);
129129
130130
// Deal with the model light
131-
if ( !m_pModelLight || (m_pModelLight->key != -index) )
131+
if ( !m_pModelLight || (m_pModelLight->key != -m_index) )
132132
{
133-
m_pModelLight = effects->CL_AllocDlight( -index );
133+
m_pModelLight = effects->CL_AllocDlight( -m_index );
134134
assert (m_pModelLight);
135135
}
136136

src/game/client/c_te_legacytempents.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ void C_LocalTempEntity::Prepare( model_t *pmodel, float time )
105105
{
106106
Interp_SetupMappings( GetVarMapping() );
107107

108-
index = -1;
108+
m_index = -1;
109109
Clear();
110110

111111
// Use these to set per-frame and termination conditions / actions
@@ -168,7 +168,7 @@ int C_LocalTempEntity::DrawStudioModel( int flags )
168168
flags,
169169
this,
170170
MODEL_INSTANCE_INVALID,
171-
index,
171+
m_index,
172172
GetModel(),
173173
GetAbsOrigin(),
174174
GetAbsAngles(),
@@ -948,7 +948,7 @@ int BreakModelDrawHelper( C_LocalTempEntity *entity, int flags )
948948
sInfo.flags = flags;
949949
sInfo.pRenderable = entity;
950950
sInfo.instance = MODEL_INSTANCE_INVALID;
951-
sInfo.entity_index = entity->index;
951+
sInfo.entity_index = entity->m_index;
952952
sInfo.pModel = entity->GetModel();
953953
sInfo.origin = entity->GetRenderOrigin();
954954
sInfo.angles = entity->GetRenderAngles();
@@ -2189,7 +2189,7 @@ int CTempEnts::AddVisibleTempEntity( C_LocalTempEntity *pEntity )
21892189
//if ( engine->IsBoxInViewCluster( mins, maxs ) )
21902190
{
21912191
// Temporary entities have no corresponding element in cl_entitylist
2192-
pEntity->index = -1;
2192+
pEntity->m_index = -1;
21932193

21942194
// Add to list
21952195
pEntity->AddToLeafSystem( false );

src/game/client/c_team.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ C_Team *GetLocalTeam( void )
186186
if ( !player )
187187
return NULL;
188188

189-
return GetPlayersTeam( player->index );
189+
return GetPlayersTeam( player->m_index );
190190
}
191191

192192
//-----------------------------------------------------------------------------
@@ -253,4 +253,4 @@ bool ArePlayersOnSameTeam( int iPlayerIndex1, int iPlayerIndex2 )
253253
int GetNumberOfTeams( void )
254254
{
255255
return g_Teams.Count();
256-
}
256+
}

0 commit comments

Comments
 (0)