fix: print queue isn't resetted on changelevel (fix #314)

This commit is contained in:
dmitry 2022-03-01 21:45:52 +03:00
commit 201626df91
No known key found for this signature in database
GPG key ID: 8297CE728B7A7E37
2 changed files with 7 additions and 0 deletions

View file

@ -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;

View file

@ -85,6 +85,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) {
auto ent = entities + i;