mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-09-19 12:06:07 +08:00
Fixed conflict between min/max macros and std::min/max when using GCC >= 4.2.
This commit is contained in:
@ -622,7 +622,7 @@ void C_RopeKeyframe::CPhysicsDelegate::ApplyConstraints( CSimplePhysics::CNode *
|
||||
AngleVectors( angles, &forward );
|
||||
|
||||
int parity = 1;
|
||||
int nFalloffNodes = min( 2, nNodes - 2 );
|
||||
int nFalloffNodes = MIN( 2, nNodes - 2 );
|
||||
LockNodeDirection( pNodes, parity, nFalloffNodes, g_flLockAmount, g_flLockFalloff, forward );
|
||||
}
|
||||
}
|
||||
@ -636,7 +636,7 @@ void C_RopeKeyframe::CPhysicsDelegate::ApplyConstraints( CSimplePhysics::CNode *
|
||||
AngleVectors( angles, &forward );
|
||||
|
||||
int parity = -1;
|
||||
int nFalloffNodes = min( 2, nNodes - 2 );
|
||||
int nFalloffNodes = MIN( 2, nNodes - 2 );
|
||||
LockNodeDirection( &pNodes[nNodes-1], parity, nFalloffNodes, g_flLockAmount, g_flLockFalloff, forward );
|
||||
}
|
||||
}
|
||||
@ -1242,7 +1242,7 @@ void C_RopeKeyframe::BuildRope( RopeSegData_t *pSegmentData )
|
||||
|
||||
// Right here, we need to specify a width that will be 1 pixel larger in screen space.
|
||||
float zCoord = CurrentViewForward().Dot( pSegmentData->m_Segments[iSegment].m_vPos - CurrentViewOrigin() );
|
||||
zCoord = max( zCoord, 0.1f );
|
||||
zCoord = MAX( zCoord, 0.1f );
|
||||
|
||||
float flScreenSpaceWidth = m_Width * flHalfScreenWidth / zCoord;
|
||||
if ( flScreenSpaceWidth < flMinScreenSpaceWidth )
|
||||
@ -1270,7 +1270,7 @@ void C_RopeKeyframe::BuildRope( RopeSegData_t *pSegmentData )
|
||||
}
|
||||
else
|
||||
{
|
||||
pSegmentData->m_flMaxBackWidth = max( pSegmentData->m_flMaxBackWidth, pSegmentData->m_BackWidths[iSegment] );
|
||||
pSegmentData->m_flMaxBackWidth = MAX( pSegmentData->m_flMaxBackWidth, pSegmentData->m_BackWidths[iSegment] );
|
||||
}
|
||||
}
|
||||
|
||||
@ -1472,12 +1472,12 @@ void C_RopeKeyframe::CalcLightValues()
|
||||
for ( int iSide=0; iSide < 6; iSide++ )
|
||||
{
|
||||
float flLen = boxColors[iSide].Length();
|
||||
flMaxIntensity = max( flMaxIntensity, flLen );
|
||||
flMaxIntensity = MAX( flMaxIntensity, flLen );
|
||||
}
|
||||
|
||||
VectorNormalize( m_LightValues[i] );
|
||||
m_LightValues[i] *= flMaxIntensity;
|
||||
float flMax = max( m_LightValues[i].x, max( m_LightValues[i].y, m_LightValues[i].z ) );
|
||||
float flMax = MAX( m_LightValues[i].x, MAX( m_LightValues[i].y, m_LightValues[i].z ) );
|
||||
if ( flMax > 1 )
|
||||
m_LightValues[i] /= flMax;
|
||||
}
|
||||
|
Reference in New Issue
Block a user