diff --git a/Code/Game/GameClient/GameClientState/Camera_FPS.cpp b/Code/Game/GameClient/GameClientState/Camera_FPS.cpp index 56a026e3..8c87970b 100644 --- a/Code/Game/GameClient/GameClientState/Camera_FPS.cpp +++ b/Code/Game/GameClient/GameClientState/Camera_FPS.cpp @@ -112,8 +112,7 @@ void Camera_FPS::StrafeLeft( Float distance ) void Camera_FPS::PitchUp( Float radian ) { - //this->pitchUp = Clamp( this->pitchUp + radian, -0.48f * pi, 0.48f * pi ); - this->pitchUp = this->pitchUp + radian; // debug hack + this->pitchUp = Clamp( this->pitchUp + radian, -0.48f * pi, 0.48f * pi ); this->head.SetAngular( this->body.angularAxis + this->pitchUp * this->body.direction.v[0] ); } diff --git a/Code/Game/GameClient/GameClientState/GameState.cpp b/Code/Game/GameClient/GameClientState/GameState.cpp index ba9bf034..910afeb9 100644 --- a/Code/Game/GameClient/GameClientState/GameState.cpp +++ b/Code/Game/GameClient/GameClientState/GameState.cpp @@ -89,12 +89,6 @@ bool GameState::Init( SharedStateContent &shared ) // Debugg hack this->InitiatePlayer( 0, "crate_generic.dan",Float3( 0,132, 10), Quaternion::identity, Float3(1), true ); - Graphics::Definitions::Pointlight light; - light.Pos = Float3( 0,132,0); - light.Color = Float3( 1.0f ); - light.Bright = 1.0f; - light.Radius = 1000.0f; - Graphics::API::AddLight( light ); // end debug hack return true; diff --git a/Code/Misc/Utilities/Utilities.h b/Code/Misc/Utilities/Utilities.h index c259a845..b97d62d7 100644 --- a/Code/Misc/Utilities/Utilities.h +++ b/Code/Misc/Utilities/Utilities.h @@ -337,7 +337,11 @@ namespace Utility template inline ValueType Clamp( const ValueType &value, const ValueType &min, const ValueType &max ) - { return value < min ? Max( value, max ) : min; } + { + if( value < min ) return min; + if( value > max ) return max; + return value; + } template inline ValueType Average( const ValueType &valueA, const ValueType &valueB )