mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2026-10-12 01:28:00 +08:00
Fixed conflict between min/max macros and std::min/max when using GCC >= 4.2.
This commit is contained in:
1 parent
b9b7f08197
commit
3e7f7bdabd
300 files changed
+1041
-1084
No files matched your search
@@ -1193,7 +1193,7 @@ void CFourWheelVehiclePhysics::UpdateDriverControls( CUserCmd *cmd, float flFram
|
||||
m_controls.throttle = 0;
|
||||
}
|
||||
|
||||
float flMaxThrottle = max( 0.1, m_maxThrottle );
|
||||
float flMaxThrottle = MAX( 0.1, m_maxThrottle );
|
||||
if ( m_controls.steering != 0 )
|
||||
{
|
||||
float flThrottleReduce = 0;
|
||||
@@ -1213,7 +1213,7 @@ void CFourWheelVehiclePhysics::UpdateDriverControls( CUserCmd *cmd, float flFram
|
||||
float limit = 1.0f - (flThrottleReduce * fabs(m_controls.steering));
|
||||
if ( limit < 0 )
|
||||
limit = 0;
|
||||
flMaxThrottle = min( flMaxThrottle, limit );
|
||||
flMaxThrottle = MIN( flMaxThrottle, limit );
|
||||
}
|
||||
|
||||
m_controls.throttle = Approach( flMaxThrottle * flAnalogThrottle, m_controls.throttle, flFrameTime * m_throttleRate );
|
||||
@@ -1243,7 +1243,7 @@ void CFourWheelVehiclePhysics::UpdateDriverControls( CUserCmd *cmd, float flFram
|
||||
m_controls.throttle = 0;
|
||||
}
|
||||
|
||||
float flMaxThrottle = min( -0.1, m_flMaxRevThrottle );
|
||||
float flMaxThrottle = MIN( -0.1, m_flMaxRevThrottle );
|
||||
m_controls.throttle = Approach( flMaxThrottle * flAnalogBrake, m_controls.throttle, flFrameTime * m_throttleRate );
|
||||
|
||||
// Apply the brake.
|
||||
@@ -1268,7 +1268,7 @@ void CFourWheelVehiclePhysics::UpdateDriverControls( CUserCmd *cmd, float flFram
|
||||
m_controls.throttle = 0;
|
||||
}
|
||||
|
||||
float flMaxThrottle = max( 0.1, m_maxThrottle );
|
||||
float flMaxThrottle = MAX( 0.1, m_maxThrottle );
|
||||
|
||||
if ( m_controls.steering != 0 )
|
||||
{
|
||||
@@ -1289,7 +1289,7 @@ void CFourWheelVehiclePhysics::UpdateDriverControls( CUserCmd *cmd, float flFram
|
||||
float limit = 1.0f - (flThrottleReduce * fabs(m_controls.steering));
|
||||
if ( limit < 0 )
|
||||
limit = 0;
|
||||
flMaxThrottle = min( flMaxThrottle, limit );
|
||||
flMaxThrottle = MIN( flMaxThrottle, limit );
|
||||
}
|
||||
|
||||
m_controls.throttle = Approach( flMaxThrottle, m_controls.throttle, flFrameTime * m_throttleRate );
|
||||
@@ -1315,7 +1315,7 @@ void CFourWheelVehiclePhysics::UpdateDriverControls( CUserCmd *cmd, float flFram
|
||||
m_controls.throttle = 0;
|
||||
}
|
||||
|
||||
float flMaxThrottle = min( -0.1, m_flMaxRevThrottle );
|
||||
float flMaxThrottle = MIN( -0.1, m_flMaxRevThrottle );
|
||||
m_controls.throttle = Approach( flMaxThrottle, m_controls.throttle, flFrameTime * m_throttleRate );
|
||||
|
||||
// Apply the brake.
|
||||
|
||||
Reference in new issue
Block a user