Restore rotating after player confirmation.

But rotation is done only once to avoid rotating kart in every fire press.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14145 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
deveee 2013-09-24 07:03:07 +00:00
parent f7d41cf008
commit 0db9da03e5

View File

@ -35,7 +35,7 @@ using namespace GUIEngine;
DEFINE_SCREEN_SINGLETON( SoccerSetupScreen );
#define KART_CONTINUOUS_ROTATION_SPEED 35.f
#define KART_CONFIRMATION_ROTATION_SPEED 0.f
#define KART_CONFIRMATION_ROTATION_SPEED 4.f
#define KART_CONFIRMATION_TARGET_ANGLE 10.f
// -----------------------------------------------------------------------------
@ -219,7 +219,8 @@ GUIEngine::EventPropagation SoccerSetupScreen::filterActions( PlayerAction acti
// Confirm team selection
for(int i=0 ; i < nb_players ; i++)
{
if(m_kart_view_info[i].local_player_id == playerId)
if(m_kart_view_info[i].local_player_id == playerId &&
m_kart_view_info[i].confirmed == false)
{
m_kart_view_info[i].confirmed = true;
m_kart_view_info[i].view->setRotateTo( KART_CONFIRMATION_TARGET_ANGLE, KART_CONFIRMATION_ROTATION_SPEED );