]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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 d09f5ebb24edc94fdf9158c1b371d6fe71d1c0cf..aad3e1dc04109bd4ce0ed26027a100e7aecfea3a 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);