From 4c6b4b9e14ff8303f093e586fb0e12113db1c0a8 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Tue, 17 Jul 2012 07:12:06 +0000 Subject: [PATCH] core: display names for entities that forget to call Entity::Tick*. --- src/ticker.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/ticker.cpp b/src/ticker.cpp index b3c5c387..26e58823 100644 --- a/src/ticker.cpp +++ b/src/ticker.cpp @@ -275,13 +275,15 @@ void *TickerData::GameThreadMain(void * /* p */) { #if !LOL_RELEASE if (e->m_tickstate != Entity::STATE_IDLE) - Log::Error("entity not idle for game tick\n"); + Log::Error("entity %s [%p] not idle for game tick\n", + e->GetName(), e); e->m_tickstate = Entity::STATE_PRETICK_GAME; #endif e->TickGame(data->deltatime); #if !LOL_RELEASE if (e->m_tickstate != Entity::STATE_POSTTICK_GAME) - Log::Error("entity missed super game tick\n"); + Log::Error("entity %s [%p] missed super game tick\n", + e->GetName(), e); e->m_tickstate = Entity::STATE_IDLE; #endif } @@ -373,13 +375,15 @@ void Ticker::TickDraw() { #if !LOL_RELEASE if (e->m_tickstate != Entity::STATE_IDLE) - Log::Error("entity not idle for draw tick\n"); + Log::Error("entity %s [%p] not idle for draw tick\n", + e->GetName(), e); e->m_tickstate = Entity::STATE_PRETICK_DRAW; #endif e->TickDraw(data->deltatime); #if !LOL_RELEASE if (e->m_tickstate != Entity::STATE_POSTTICK_DRAW) - Log::Error("entity missed super draw tick\n"); + Log::Error("entity %s [%p] missed super draw tick\n", + e->GetName(), e); e->m_tickstate = Entity::STATE_IDLE; #endif }