Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
32b7dfe
refactor(server): misc minor renames and changes to appease compiler
anf3is Jun 1, 2026
f51f48b
rename value -> position
anf3is Jun 6, 2026
1a19c8f
rename ptag -> ptagOriginal
anf3is Jun 6, 2026
44f3487
rename flGain
anf3is Jun 1, 2026
f41678d
remove second controller reference getter
anf3is Jun 1, 2026
e2d90e9
remove second compute flTotalDist
anf3is Jun 3, 2026
9fc1112
rename origin/angles -> shadowOrigin/shadowAngles
anf3is Jun 6, 2026
8f1e38a
rename origin -> hanging_origin
anf3is Jun 6, 2026
bf8ae78
remove second pInflictor getter
anf3is Jun 6, 2026
2b4bfa4
rename args -> scriptArgs
anf3is Jun 1, 2026
b0d6232
rename p1234 -> vP1234
anf3is Jun 1, 2026
3fd975b
rename taskID -> taskID2
anf3is Jun 1, 2026
0bf110c
rename goal -> lateralCoverGoal
anf3is Jun 6, 2026
9bbda5d
add comment for coverGoal
anf3is Jun 6, 2026
01f7023
refactor(client): rename index -> m_index
anf3is Jun 1, 2026
a8a22db
refactor(client): rename view -> g_view
anf3is Jun 1, 2026
03dedfa
refactor(client): rename model -> m_model
anf3is Jun 1, 2026
52f59ab
refactor(client): rename flags -> m_flags
anf3is Jun 6, 2026
30d85ec
refactor(client): misc minor renames and changes to appease compiler
anf3is Jun 1, 2026
b8867e1
rename entry -> repeatEntry
anf3is Jun 6, 2026
4ccc70e
rename target -> targetI
anf3is Jun 3, 2026
311b828
rename entry -> repeatEntry
anf3is Jun 1, 2026
243e42d
rename p1234 -> vP1232
anf3is Jun 3, 2026
670a280
remove new tmp variables
anf3is Jun 3, 2026
68e98fd
remove new tmp buffer wzValue
anf3is Jun 1, 2026
462ff62
remove unused variable offset
anf3is Jun 6, 2026
5b38a2c
remove second reference shadow
anf3is Jun 6, 2026
767aafa
remove second local player check
anf3is Jun 6, 2026
c5dd9fd
remove second local base player check
anf3is Jun 6, 2026
a3fae8f
remove second pointer pRenderContext
anf3is Jun 6, 2026
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
4 changes: 2 additions & 2 deletions src/game/client/C_WaterLODControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ END_RECV_TABLE()
//------------------------------------------------------------------------------
void C_WaterLODControl::OnDataChanged(DataUpdateType_t updateType)
{
view->SetCheapWaterStartDistance( m_flCheapWaterStartDistance );
view->SetCheapWaterEndDistance( m_flCheapWaterEndDistance );
g_view->SetCheapWaterStartDistance( m_flCheapWaterStartDistance );
g_view->SetCheapWaterEndDistance( m_flCheapWaterEndDistance );
}

//------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/game/client/WaterLODMaterialProxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void CWaterLODMaterialProxy::OnBind( void *pC_BaseEntity )
return;
}
float start, end;
view->GetWaterLODParams( start, end );
g_view->GetWaterLODParams( start, end );
m_pCheapWaterStartDistanceVar->SetFloatValue( start );
m_pCheapWaterEndDistanceVar->SetFloatValue( end );
}
Expand Down
68 changes: 34 additions & 34 deletions src/game/client/c_baseanimating.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1204,43 +1204,43 @@ void C_BaseAnimating::ParseModelEffects( KeyValues *modelKeyValues )
for ( KeyValues *pSingleEffect = pkvAllParticleEffects->GetFirstSubKey(); pSingleEffect; pSingleEffect = pSingleEffect->GetNextKey() )
{
const char *pszParticleEffect = pSingleEffect->GetString( "name", "" );
const char *pszAttachment = pSingleEffect->GetString( "attachment_point", "" );
const char *pszAttachType = pSingleEffect->GetString( "attachment_type", "" );
const char *pszAttachOffset = pSingleEffect->GetString( "attachment_offset", "" );
const char *pszPEAttachment = pSingleEffect->GetString( "attachment_point", "" );
const char *pszPEAttachType = pSingleEffect->GetString( "attachment_type", "" );
const char *pszPEAttachOffset = pSingleEffect->GetString( "attachment_offset", "" );

// Convert attach type
int iAttachType = GetAttachTypeFromString( pszAttachType );
if ( iAttachType == -1 )
int iPEAttachType = GetAttachTypeFromString( pszPEAttachType );
if ( iPEAttachType == -1 )
{
Warning("Invalid attach type specified for particle effect in model '%s' keyvalues section. Trying to spawn effect '%s' with attach type of '%s'\n", GetModelName(), pszParticleEffect, pszAttachType );
Warning("Invalid attach type specified for particle effect in model '%s' keyvalues section. Trying to spawn effect '%s' with attach type of '%s'\n", GetModelName(), pszParticleEffect, pszPEAttachType );
return;
}

// Convert attachment point
int iAttachment = atoi(pszAttachment);
int iAttachment = atoi(pszPEAttachment);
// See if we can find any attachment points matching the name
if ( pszAttachment[0] != '0' && iAttachment == 0 )
if ( pszPEAttachment[0] != '0' && iAttachment == 0 )
{
iAttachment = LookupAttachment( pszAttachment );
iAttachment = LookupAttachment( pszPEAttachment );
if ( iAttachment == -1 )
{
Warning("Failed to find attachment point specified for particle effect in model '%s' keyvalues section. Trying to spawn effect '%s' on attachment named '%s'\n", GetModelName(), pszParticleEffect, pszAttachment );
Warning("Failed to find attachment point specified for particle effect in model '%s' keyvalues section. Trying to spawn effect '%s' on attachment named '%s'\n", GetModelName(), pszParticleEffect, pszPEAttachment );
return;
}
}

Vector vecOffset = vec3_origin;
Vector vecOffsetPE = vec3_origin;

if ( pszAttachOffset )
if ( pszPEAttachOffset )
{
float flVec[3];
UTIL_StringToVector( flVec, pszAttachOffset );
vecOffset = Vector( flVec[0], flVec[1], flVec[2] );
UTIL_StringToVector( flVec, pszPEAttachOffset );
vecOffsetPE = Vector( flVec[0], flVec[1], flVec[2] );
}

CUtlReference<CNewParticleEffect> hModelEffect;
// Spawn the particle effectw
hModelEffect = ParticleProp()->Create( pszParticleEffect, (ParticleAttachment_t)iAttachType, iAttachment, vecOffset );
hModelEffect = ParticleProp()->Create( pszParticleEffect, (ParticleAttachment_t)iPEAttachType, iAttachment, vecOffsetPE );

KeyValues *pkvAllControlPoints = pSingleEffect->FindKey("ControlPoints");
if ( pkvAllControlPoints )
Expand All @@ -1249,37 +1249,37 @@ void C_BaseAnimating::ParseModelEffects( KeyValues *modelKeyValues )
for ( KeyValues *pSingleCP = pkvAllControlPoints->GetFirstSubKey(); pSingleCP; pSingleCP = pSingleCP->GetNextKey() )
{
const char *pszControlPoint = pSingleCP->GetString( "cp_number", "" );
const char *pszAttachment = pSingleCP->GetString( "attachment_point", "" );
const char *pszAttachType = pSingleCP->GetString( "attachment_type", "" );
const char *pszAttachOffset = pSingleCP->GetString( "attachment_offset", "" );
const char *pszCPAttachment = pSingleCP->GetString( "attachment_point", "" );
const char *pszCPAttachType = pSingleCP->GetString( "attachment_type", "" );
const char *pszCPAttachOffset = pSingleCP->GetString( "attachment_offset", "" );

// Convert control point
int iControlPoint = atoi(pszControlPoint);

// Convert attach type
int iAttachType = GetAttachTypeFromString( pszAttachType );
if ( iAttachType == -1 )
int iCPAttachType = GetAttachTypeFromString( pszCPAttachType );
if ( iCPAttachType == -1 )
{
Warning("Invalid attach type specified for particle effect in model '%s' keyvalues section. Trying to spawn effect '%s' with attach type of '%s'\n", GetModelName(), pszParticleEffect, pszAttachType );
Warning("Invalid attach type specified for particle effect in model '%s' keyvalues section. Trying to spawn effect '%s' with attach type of '%s'\n", GetModelName(), pszParticleEffect, pszCPAttachType );
return;
}

Vector vecOffset = vec3_origin;
Vector vecOffsetCP = vec3_origin;

if ( pszAttachOffset )
if ( pszCPAttachOffset )
{
float flVec[3];
UTIL_StringToVector( flVec, pszAttachOffset );
vecOffset = Vector( flVec[0], flVec[1], flVec[2] );
UTIL_StringToVector( flVec, pszCPAttachOffset );
vecOffsetCP = Vector( flVec[0], flVec[1], flVec[2] );
}

// Add the control point if we already have the effect
if ( hModelEffect )
{
if ( iAttachType == PATTACH_WORLDORIGIN )
ParticleProp()->AddControlPoint( hModelEffect, iControlPoint, NULL, (ParticleAttachment_t)iAttachType, NULL, vecOffset );
if ( iCPAttachType == PATTACH_WORLDORIGIN )
ParticleProp()->AddControlPoint( hModelEffect, iControlPoint, NULL, (ParticleAttachment_t)iCPAttachType, NULL, vecOffsetCP );
else
ParticleProp()->AddControlPoint( hModelEffect, iControlPoint, this, (ParticleAttachment_t)iAttachType, pszAttachment, vecOffset );
ParticleProp()->AddControlPoint( hModelEffect, iControlPoint, this, (ParticleAttachment_t)iCPAttachType, pszCPAttachment, vecOffsetCP );
}

}
Expand Down Expand Up @@ -2741,7 +2741,7 @@ bool C_BaseAnimating::SetupBones( matrix3x4a_t *pBoneToWorldOut, int nMaxBones,
// Prevent spammage!!!
if ( gpGlobals->realtime >= lastWarning + 1.0f )
{
DevMsgRT( "*** ERROR: Bone access not allowed (entity %i:%s)\n", index, GetClassname() );
DevMsgRT( "*** ERROR: Bone access not allowed (entity %i:%s)\n", m_index, GetClassname() );
lastWarning = gpGlobals->realtime;
}
}
Expand Down Expand Up @@ -3403,9 +3403,9 @@ void C_BaseAnimating::DoInternalDrawModel( ClientModelRenderInfo_t *pInfo, DrawM
if ( VPhysicsGetObject() )
{
static color32 debugColorPhys = {255,0,0,0};
matrix3x4_t matrix;
VPhysicsGetObject()->GetPositionMatrix( &matrix );
engine->DebugDrawPhysCollide( pCollide->solids[0], NULL, matrix, debugColorPhys );
matrix3x4_t matrix2;
VPhysicsGetObject()->GetPositionMatrix( &matrix2 );
engine->DebugDrawPhysCollide( pCollide->solids[0], NULL, matrix2, debugColorPhys );
}
}
}
Expand Down Expand Up @@ -3504,7 +3504,7 @@ int C_BaseAnimating::InternalDrawModel( int flags, const RenderableInstance_t &i
pInfo->flags = flags;
pInfo->pRenderable = this;
pInfo->instance = GetModelInstance();
pInfo->entity_index = index;
pInfo->entity_index = m_index;
pInfo->pModel = GetModel();
pInfo->origin = GetRenderOrigin();
pInfo->angles = GetRenderAngles();
Expand Down Expand Up @@ -3579,7 +3579,7 @@ void C_BaseAnimating::ProcessMuzzleFlashEvent()
GetAttachment( 1, vAttachment, dummyAngles );

// Make an elight
dlight_t *el = effects->CL_AllocElight( LIGHT_INDEX_MUZZLEFLASH + index );
dlight_t *el = effects->CL_AllocElight( LIGHT_INDEX_MUZZLEFLASH + m_index );
el->origin = vAttachment;
el->radius = random->RandomInt( 32, 64 );
el->decay = el->radius / 0.05f;
Expand Down
Loading
Loading