From 2c686bbd1fd1ac6839152d0993e6454b7c683c13 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Tue, 25 Oct 2011 20:31:48 +0200 Subject: [PATCH] more isNew debugging --- qcsrc/client/Main.qc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc index 7abf72087..554c8a86a 100644 --- a/qcsrc/client/Main.qc +++ b/qcsrc/client/Main.qc @@ -964,13 +964,23 @@ void CSQC_Ent_Update(float bIsNewEntity) #ifdef DP_CSQC_ENTITY_REMOVE_IS_B0RKED if(self.enttype) - if(t != self.enttype) + { + if(t != self.enttype || bIsNewEntity) { //print(_("A CSQC entity changed its type!\n")); - print(sprintf(_("A CSQC entity changed its type! (edict: %d, classname: %s)\n"), num_for_edict(self), self.classname)); + print(sprintf(_("A CSQC entity changed its type! (edict: %d, type: %d -> %d)\n"), num_for_edict(self), self.enttype, t)); Ent_Remove(); bIsNewEntity = 1; } + } + else + { + if(!bIsNewEntity) + { + print(sprintf(_("A CSQC entity appeared out of nowhere! (edict: %d, type: %d)\n"), num_for_edict(self), t)); + bIsNewEntity = 1; + } + } #endif self.enttype = t; switch(t) -- 2.39.2