From c8a50d2f49f054140ed1393aed82017417b5894c Mon Sep 17 00:00:00 2001 From: Benau Date: Tue, 24 Jul 2018 15:44:31 +0800 Subject: [PATCH] Temporarily fix rewind queue for undo --- src/network/rewind_queue.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/network/rewind_queue.cpp b/src/network/rewind_queue.cpp index 4e8bca753..b9475c4fb 100644 --- a/src/network/rewind_queue.cpp +++ b/src/network/rewind_queue.cpp @@ -354,8 +354,10 @@ int RewindQueue::undoUntil(int undo_ticks) { // A rewind is done after a state in the past is inserted. This function // makes sure that m_current is not end() - assert(m_current != m_all_rewind_info.end()); - + //assert(m_current != m_all_rewind_info.end()); + assert(!m_all_rewind_info.empty()); + m_current = m_all_rewind_info.end(); + m_current--; while((*m_current)->getTicks() > undo_ticks || (*m_current)->isEvent() || !(*m_current)->isConfirmed()) {