1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-14 21:39:09 +00:00

Avoid sending an action multiple times in a row

This commit is contained in:
fgenesis 2015-08-16 02:24:14 +02:00
parent 9285ce49bd
commit b320739684

View file

@ -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);
}
}