Merge branch 'GameClient' of https://github.com/dean11/Danbias into GameClient
This commit is contained in:
commit
0a70839211
|
@ -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] );
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -337,7 +337,11 @@ namespace Utility
|
|||
|
||||
template<typename ValueType>
|
||||
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<typename ValueType>
|
||||
inline ValueType Average( const ValueType &valueA, const ValueType &valueB )
|
||||
|
|
Loading…
Reference in New Issue