Fixed resetAxisDirection resetting buttons that happened to have the same ID as the axis being resetted

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9743 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2011-09-04 23:01:59 +00:00
parent 1771ec44fb
commit 256f611bbd

View File

@ -139,7 +139,9 @@ void GamePadDevice::resetAxisDirection(const int axis,
for(int n=0; n<PA_COUNT; n++)
{
Binding& bind = m_configuration->getBinding(n);
if(bind.getId() == axis && bind.getDirection()== direction)
if(bind.getType() == Input::IT_STICKMOTION &&
bind.getId() == axis &&
bind.getDirection()== direction)
{
((PlayerController*)(pk->getController()))->action((PlayerAction)n, 0);
return;