From e77c24469aa5fff83794a114c82b3f637268ca92 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Sun, 10 Mar 2013 22:32:59 -0400 Subject: [PATCH] clone last input event to preserve multiple directions --- src/inputs.d | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/inputs.d b/src/inputs.d index ff648bf..bcae9d4 100644 --- a/src/inputs.d +++ b/src/inputs.d @@ -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; }