mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-09-19 20:16:10 +08:00
Fix conflicts with std::swap.
This commit is contained in:
@ -821,7 +821,7 @@ void CNPC_Advisor::RunTask( const Task_t *pTask )
|
||||
// swap them if necessary (1 must be the bottom)
|
||||
if (m_levitateCallback.m_vecGoalPos1.z > m_levitateCallback.m_vecGoalPos2.z)
|
||||
{
|
||||
swap(m_levitateCallback.m_vecGoalPos1,m_levitateCallback.m_vecGoalPos2);
|
||||
V_swap(m_levitateCallback.m_vecGoalPos1,m_levitateCallback.m_vecGoalPos2);
|
||||
}
|
||||
|
||||
m_levitateCallback.m_flFloat = 0.06f; // this is an absolute accumulation upon gravity
|
||||
|
@ -1626,13 +1626,13 @@ void CPropJeepEpisodic::InputOutsideTransition( inputdata_t &inputdata )
|
||||
VectorRotate( vecSurroundMaxs, vecTeleportAngles, vecMaxs );
|
||||
|
||||
if ( vecMaxs.x < vecMins.x )
|
||||
swap( vecMins.x, vecMaxs.x );
|
||||
V_swap( vecMins.x, vecMaxs.x );
|
||||
|
||||
if ( vecMaxs.y < vecMins.y )
|
||||
swap( vecMins.y, vecMaxs.y );
|
||||
V_swap( vecMins.y, vecMaxs.y );
|
||||
|
||||
if ( vecMaxs.z < vecMins.z )
|
||||
swap( vecMins.z, vecMaxs.z );
|
||||
V_swap( vecMins.z, vecMaxs.z );
|
||||
|
||||
// Move up
|
||||
vecTeleportPos.z += ( vecMaxs.z - vecMins.z );
|
||||
|
@ -536,7 +536,7 @@ bool CFilterEnemy::PassesProximityFilter( CBaseEntity *pCaller, CBaseEntity *pEn
|
||||
float flSmallerRadius = m_flRadius;
|
||||
if ( flSmallerRadius > flLargerRadius )
|
||||
{
|
||||
swap( flLargerRadius, flSmallerRadius );
|
||||
V_swap( flLargerRadius, flSmallerRadius );
|
||||
}
|
||||
|
||||
float flDist;
|
||||
|
@ -1843,7 +1843,7 @@ void CNPC_AttackHelicopter::ShootAtPlayer( const Vector &vBasePos, const Vector
|
||||
for ( i = 0; i < nActualTargets; ++i )
|
||||
{
|
||||
int nSwap = random->RandomInt( 0, nActualTargets - 1 );
|
||||
swap( ppNearbyTargets[i], ppNearbyTargets[nSwap] );
|
||||
V_swap( ppNearbyTargets[i], ppNearbyTargets[nSwap] );
|
||||
}
|
||||
|
||||
// Just shoot where we're facing
|
||||
@ -2120,7 +2120,7 @@ void CNPC_AttackHelicopter::ShootAtVehicle( const Vector &vBasePos, const Vector
|
||||
for ( i = 0; i < nActualTargets; ++i )
|
||||
{
|
||||
int nSwap = random->RandomInt( 0, nActualTargets - 1 );
|
||||
swap( ppNearbyTargets[i], ppNearbyTargets[nSwap] );
|
||||
V_swap( ppNearbyTargets[i], ppNearbyTargets[nSwap] );
|
||||
}
|
||||
|
||||
// Just shoot where we're facing
|
||||
|
@ -355,7 +355,7 @@ void CNPC_CombineCamera::Spawn()
|
||||
|
||||
if (m_nOuterRadius < m_nInnerRadius)
|
||||
{
|
||||
swap(m_nOuterRadius, m_nInnerRadius);
|
||||
V_swap(m_nOuterRadius, m_nInnerRadius);
|
||||
}
|
||||
|
||||
// Do we start active?
|
||||
@ -1117,17 +1117,17 @@ void CNPC_CombineCamera::SetHeight(float height)
|
||||
|
||||
if (mins.x > maxs.x)
|
||||
{
|
||||
swap(mins.x, maxs.x);
|
||||
V_swap(mins.x, maxs.x);
|
||||
}
|
||||
|
||||
if (mins.y > maxs.y)
|
||||
{
|
||||
swap(mins.y, maxs.y);
|
||||
V_swap(mins.y, maxs.y);
|
||||
}
|
||||
|
||||
if (mins.z > maxs.z)
|
||||
{
|
||||
swap(mins.z, maxs.z);
|
||||
V_swap(mins.z, maxs.z);
|
||||
}
|
||||
|
||||
SetCollisionBounds(mins, maxs);
|
||||
|
@ -1093,17 +1093,17 @@ void CNPC_CeilingTurret::SetHeight( float height )
|
||||
|
||||
if ( mins.x > maxs.x )
|
||||
{
|
||||
swap( mins.x, maxs.x );
|
||||
V_swap( mins.x, maxs.x );
|
||||
}
|
||||
|
||||
if ( mins.y > maxs.y )
|
||||
{
|
||||
swap( mins.y, maxs.y );
|
||||
V_swap( mins.y, maxs.y );
|
||||
}
|
||||
|
||||
if ( mins.z > maxs.z )
|
||||
{
|
||||
swap( mins.z, maxs.z );
|
||||
V_swap( mins.z, maxs.z );
|
||||
}
|
||||
|
||||
SetCollisionBounds( mins, maxs );
|
||||
|
@ -562,7 +562,7 @@ void CHLTVDirector::CreateShotFromEvent( CGameEvent *event )
|
||||
// if we show ineye view, show it more likely from killer
|
||||
if ( RandomFloat(0,1) > (bInEye?0.3f:0.7f) )
|
||||
{
|
||||
swap( attacker, victim );
|
||||
V_swap( attacker, victim );
|
||||
}
|
||||
|
||||
// hurting a victim is shown as chase more often
|
||||
|
@ -1280,7 +1280,7 @@ IPhysicsConstraint *CPhysSlideConstraint::CreateConstraint( IPhysicsConstraintGr
|
||||
sliding.limitMax = DotProduct( axisDirection, m_axisEnd );
|
||||
if ( sliding.limitMax < sliding.limitMin )
|
||||
{
|
||||
swap( sliding.limitMin, sliding.limitMax );
|
||||
V_swap( sliding.limitMin, sliding.limitMax );
|
||||
}
|
||||
|
||||
// expand limits to make initial position of the attached object valid
|
||||
|
@ -4789,7 +4789,7 @@ void CPropDoorRotating::Spawn()
|
||||
// that the model already be set.
|
||||
if ( IsHingeOnLeft() )
|
||||
{
|
||||
swap( m_angRotationOpenForward, m_angRotationOpenBack );
|
||||
V_swap( m_angRotationOpenForward, m_angRotationOpenBack );
|
||||
}
|
||||
|
||||
// Figure out our volumes of movement as this door opens
|
||||
|
Reference in New Issue
Block a user