]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix message spam for cl_casings 0 due to bad call to Casing_Delete
authorRudolf Polzer <divverent@alientrap.org>
Sun, 26 Feb 2012 15:07:15 +0000 (16:07 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Sun, 26 Feb 2012 15:07:15 +0000 (16:07 +0100)
qcsrc/client/casings.qc

index d4d1041c80b5b2bfb63cbf1208021b9cb3ad55af..a43d1726fcdce42a09aa30356391dc25cca57ac1 100644 (file)
@@ -77,7 +77,7 @@ void Ent_Casing(float isNew)
 {
        entity casing;
 
-    casing = RubbleNew("casing");
+       casing = RubbleNew("casing");
        casing.state = ReadByte();
        casing.silent = (casing.state & 0x80);
        casing.state = (casing.state & 0x7F);
@@ -115,11 +115,16 @@ void Ent_Casing(float isNew)
                }
 
                setsize(casing, '0 0 -1', '0 0 -1');
-       }
-    else
-        Casing_Delete();
 
-       RubbleLimit("casing", autocvar_cl_casings_maxcount, Casing_Delete);
+               RubbleLimit("casing", autocvar_cl_casings_maxcount, Casing_Delete);
+       }
+       else
+       {
+               entity oldself = self;
+               self = casing;
+               Casing_Delete(); // yes, this IS stupid, but I don't need to duplicate all the read* stuff then
+               self = oldself;
+       }
 }
 
 void Casings_Precache()