@ -473,7 +473,7 @@ void AiL::HandleUserInput(float fElapsedTime){
float moveAmt = " Player.MoveSpd " _F ;
if ( Input : : UsingGamepad ( ) & & KEY_SCROLLHORZ_L . Analog ( ) > = 0.2f ) {
float controllerAmt = abs ( KEY_SCROLLHORZ_L . Analog ( ) ) ;
if ( controllerAmt > = 0.8 f ) controllerAmt = 1.f ; //Edge zone.
if ( controllerAmt > = 0.6 f ) controllerAmt = 1.f ; //Edge zone.
if ( controllerAmt > animationSpd ) {
animationSpd = controllerAmt ;
}
@ -500,11 +500,12 @@ void AiL::HandleUserInput(float fElapsedTime){
float moveAmt = " Player.MoveSpd " _F ;
if ( Input : : UsingGamepad ( ) & & KEY_SCROLLHORZ_L . Analog ( ) < = - 0.2f ) {
float controllerAmt = abs ( KEY_SCROLLHORZ_L . Analog ( ) ) ;
if ( controllerAmt > = 0.8f ) controllerAmt = 1.f ; //Edge zone.
controllerAmt + = 0.2f ;
if ( controllerAmt > = 0.6f ) controllerAmt = 1.f ; //Edge zone.
if ( controllerAmt > animationSpd ) {
animationSpd = controllerAmt ;
}
moveAmt * = abs ( KEY_SCROLLHORZ_L . Analog ( ) ) ;
moveAmt * = controllerAmt ;
} else animationSpd = 1.f ;
player - > SetX ( player - > GetX ( ) - fElapsedTime * moveAmt * player - > GetMoveSpdMult ( ) ) ;
player - > movementVelocity . x = - moveAmt * fElapsedTime * player - > GetMoveSpdMult ( ) ;
@ -526,11 +527,12 @@ void AiL::HandleUserInput(float fElapsedTime){
float moveAmt = " Player.MoveSpd " _F ;
if ( Input : : UsingGamepad ( ) & & KEY_SCROLLVERT_L . Analog ( ) < = - 0.2f ) {
float controllerAmt = abs ( KEY_SCROLLVERT_L . Analog ( ) ) ;
if ( controllerAmt > = 0.8f ) controllerAmt = 1.f ; //Edge zone.
controllerAmt + = 0.2f ;
if ( controllerAmt > = 0.6f ) controllerAmt = 1.f ; //Edge zone.
if ( controllerAmt > animationSpd ) {
animationSpd = controllerAmt ;
}
moveAmt * = abs ( KEY_SCROLLVERT_L . Analog ( ) ) ;
moveAmt * = controllerAmt ;
} else animationSpd = 1.f ;
player - > SetY ( player - > GetY ( ) - fElapsedTime * moveAmt * player - > GetMoveSpdMult ( ) ) ;
player - > movementVelocity . y = - moveAmt * fElapsedTime * player - > GetMoveSpdMult ( ) ;
@ -544,11 +546,12 @@ void AiL::HandleUserInput(float fElapsedTime){
float moveAmt = " Player.MoveSpd " _F ;
if ( Input : : UsingGamepad ( ) & & KEY_SCROLLVERT_L . Analog ( ) > = 0.2f ) {
float controllerAmt = abs ( KEY_SCROLLVERT_L . Analog ( ) ) ;
if ( controllerAmt > = 0.8f ) controllerAmt = 1.f ; //Edge zone.
controllerAmt + = 0.2f ;
if ( controllerAmt > = 0.6f ) controllerAmt = 1.f ; //Edge zone.
if ( controllerAmt > animationSpd ) {
animationSpd = controllerAmt ;
}
moveAmt * = abs ( KEY_SCROLLVERT_L . Analog ( ) ) ;
moveAmt * = controllerAmt ;
} else animationSpd = 1.f ;
player - > SetY ( player - > GetY ( ) + fElapsedTime * moveAmt * player - > GetMoveSpdMult ( ) ) ;
player - > movementVelocity . y = moveAmt * fElapsedTime * player - > GetMoveSpdMult ( ) ;