From 4db2c0c6fec935bca026d13d09316f6522a5006b Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Thu, 3 Feb 2011 23:42:15 +0000 Subject: [PATCH] Reduce error verbosity when entities are stuck at exit. --- src/ticker.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ticker.cpp b/src/ticker.cpp index 23331d46..277de427 100644 --- a/src/ticker.cpp +++ b/src/ticker.cpp @@ -31,7 +31,7 @@ public: todolist(0), autolist(0), nentities(0), frame(0), deltams(0), bias(0), - quit(0), quitframe(0), quitdelay(20) + quit(0), quitframe(0), quitdelay(20), panic(0) { for (int i = 0; i < Entity::ALLGROUP_END; i++) list[i] = NULL; @@ -66,7 +66,7 @@ private: float deltams, bias; /* Shutdown management */ - int quit, quitframe, quitdelay; + int quit, quitframe, quitdelay, panic; } tickerdata; @@ -168,8 +168,10 @@ void Ticker::TickGame() if (entity && entity->ref) { #if !FINAL_RELEASE - fprintf(stderr, "ERROR: %i entities stuck after %i frames\n", - data->nentities, data->quitdelay); + if (!data->panic) + fprintf(stderr, "ERROR: %i entities stuck after %i frames\n", + data->nentities, data->quitdelay); + data->panic = 1; #endif entity->ref--; data->quitdelay = data->quitdelay > 1 ? data->quitdelay / 2 : 1;