Skip to content

Commit b320739

Browse files
committed
Avoid sending an action multiple times in a row
1 parent 9285ce4 commit b320739

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

BBGE/ActionMapper.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ void ActionMapper::addAction (int actionID, int k)
127127

128128
if (ad)
129129
{
130-
ad->buttonList.push_back(k);
130+
if(std::find(ad->buttonList.begin(), ad->buttonList.end(), k) == ad->buttonList.end())
131+
ad->buttonList.push_back(k);
131132
keyDownMap[k] = core->getKeyState(k);
132133
}
133134
}

0 commit comments

Comments
 (0)