From: Rudolf Polzer Date: Mon, 20 Feb 2012 10:50:43 +0000 (+0100) Subject: make a clearer warning when CSQC_Ent_Remove is called for a removed ent. X-Git-Tag: xonotic-v0.6.0~66^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=990408b5517a6b4f4534fa96600b759e2ab9526a;p=xonotic%2Fxonotic-data.pk3dir.git make a clearer warning when CSQC_Ent_Remove is called for a removed ent. --- diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc index d09f5ebb2..aad3e1dc0 100644 --- a/qcsrc/client/Main.qc +++ b/qcsrc/client/Main.qc @@ -778,6 +778,11 @@ void Ent_Remove() // CSQC_Ent_Remove : Called when the server requests a SSQC / CSQC entity to be removed. Essentially call remove(self) as well. void CSQC_Ent_Remove() { + if(wasfreed(self)) + { + print("WARNING: CSQC_Ent_Remove called for already removed entity. Packet loss?\n"); + return; + } if(self.enttype) Ent_Remove(); remove(self);