From 201626df91fc07a894186f04b4835693d87d70f9 Mon Sep 17 00:00:00 2001 From: dmitry Date: Tue, 1 Mar 2022 21:45:52 +0300 Subject: [PATCH] fix: print queue isn't resetted on changelevel (fix #314) --- inc/control.h | 4 ++++ src/engine.cpp | 3 +++ 2 files changed, 7 insertions(+) diff --git a/inc/control.h b/inc/control.h index 068d758..568157f 100644 --- a/inc/control.h +++ b/inc/control.h @@ -175,6 +175,10 @@ public: m_ent = ent; } + void resetFlushTimestamp () { + m_printQueueFlushTimestamp = 0.0f; + } + int intValue (size_t arg) const { if (!hasArg (arg)) { return 0; diff --git a/src/engine.cpp b/src/engine.cpp index 6a355dd..175d447 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -84,6 +84,9 @@ void Game::levelInitialize (edict_t *entities, int max) { // install the sendto hook to fake queries util.installSendTo (); + + // flush any print queue + ctrl.resetFlushTimestamp (); // go thru the all entities on map, and do whatever we're want for (int i = 0; i < max; ++i) {