removed debug checks, made time laps shorter
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3360 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
2dbe5795eb
commit
96ac216d34
@ -96,12 +96,7 @@ void InputManager::update(float dt)
|
||||
if(m_timer_in_use)
|
||||
{
|
||||
m_timer -= dt;
|
||||
std::cout << dt << " seconds elpased, timer is now at " << m_timer << std::endl;
|
||||
if(m_timer < 0)
|
||||
{
|
||||
std::cout << "timer over, next key ready to be read" << std::endl;
|
||||
m_timer_in_use = false;
|
||||
}
|
||||
if(m_timer < 0) m_timer_in_use = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -344,11 +339,7 @@ void InputManager::input(Input::InputType type, int id0, int id1, int id2,
|
||||
const bool action_found = m_device_manager->mapInputToPlayerAndAction( type, id0, id1, id2, value, &player, &action );
|
||||
if(!action_found) return;
|
||||
|
||||
if(m_timer_in_use)
|
||||
{
|
||||
std::cout << "i'm ignoring an event, next is in " << m_timer << " seconds" << std::endl;
|
||||
return; // time between keys not elapsed yet
|
||||
}
|
||||
if(m_timer_in_use) return; // time between keys not elapsed yet
|
||||
|
||||
if(action == PA_FIRE || action == PA_NITRO)
|
||||
evt.Key = irr::KEY_RETURN;
|
||||
@ -368,11 +359,9 @@ void InputManager::input(Input::InputType type, int id0, int id1, int id2,
|
||||
evt.PressedDown = abs(value) > MAX_VALUE/2;
|
||||
if(evt.PressedDown)
|
||||
{
|
||||
std::cout << "Detected an action of type " << action << std::endl;
|
||||
|
||||
// minimum time between two gamepad events in menu
|
||||
m_timer_in_use = true;
|
||||
m_timer = 0.5;
|
||||
m_timer = 0.25;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user