clone last input event to preserve multiple directions
This commit is contained in:
parent
f3c0f42689
commit
e77c24469a
@ -15,6 +15,12 @@ class InputEvent
|
|||||||
uint tick;
|
uint tick;
|
||||||
Inputs inputs;
|
Inputs inputs;
|
||||||
InputEvent next;
|
InputEvent next;
|
||||||
|
|
||||||
|
this() { }
|
||||||
|
this(InputEvent ie)
|
||||||
|
{
|
||||||
|
inputs = ie.inputs;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class InputEventList
|
class InputEventList
|
||||||
@ -35,7 +41,7 @@ public:
|
|||||||
}
|
}
|
||||||
else if (m_last_event.tick < tick)
|
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 = m_last_event.next;
|
||||||
m_last_event.tick = tick;
|
m_last_event.tick = tick;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user