clone last input event to preserve multiple directions

This commit is contained in:
josh committed 2013-03-10 22:32:59 -04:00
1 parent f3c0f42689
commit e77c24469a
1 file changed
+7 -1
+7 -1
View File
@@ -15,6 +15,12 @@ class InputEvent
uint tick;
Inputs inputs;
InputEvent next;
this() { }
this(InputEvent ie)
{
inputs = ie.inputs;
}
};
class InputEventList
@@ -35,7 +41,7 @@ public:
}
else if (m_last_event.tick < tick)
{
m_last_event.next = new InputEvent();
m_last_event.next = new InputEvent(m_last_event);
m_last_event = m_last_event.next;
m_last_event.tick = tick;
}