1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-15 05:59:16 +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,6 +127,7 @@ void ActionMapper::addAction (int actionID, int k)
if (ad) if (ad)
{ {
if(std::find(ad->buttonList.begin(), ad->buttonList.end(), k) == ad->buttonList.end())
ad->buttonList.push_back(k); ad->buttonList.push_back(k);
keyDownMap[k] = core->getKeyState(k); keyDownMap[k] = core->getKeyState(k);
} }