Skip to content

Commit

Permalink
Avoid sending an action multiple times in a row
Browse files Browse the repository at this point in the history
  • Loading branch information
fgenesis committed Aug 16, 2015
1 parent 9285ce4 commit b320739
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion BBGE/ActionMapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ void ActionMapper::addAction (int actionID, int k)

if (ad)
{
ad->buttonList.push_back(k);
if(std::find(ad->buttonList.begin(), ad->buttonList.end(), k) == ad->buttonList.end())
ad->buttonList.push_back(k);
keyDownMap[k] = core->getKeyState(k);
}
}
Expand Down

0 comments on commit b320739

Please # to comment.