make a clearer warning when CSQC_Ent_Remove is called for a removed ent.
authorRudolf Polzer <divverent@xonotic.org>
Mon, 20 Feb 2012 10:50:43 +0000 (11:50 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Mon, 20 Feb 2012 10:50:43 +0000 (11:50 +0100)
qcsrc/client/Main.qc

index d09f5eb..aad3e1d 100644 (file)
@@ -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);