From: Rudolf Polzer Date: Sun, 26 Feb 2012 15:07:15 +0000 (+0100) Subject: fix message spam for cl_casings 0 due to bad call to Casing_Delete X-Git-Tag: xonotic-v0.6.0~48^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=60458b1f58c66a536c71df5b8b56606da42553ed;p=xonotic%2Fxonotic-data.pk3dir.git fix message spam for cl_casings 0 due to bad call to Casing_Delete --- diff --git a/qcsrc/client/casings.qc b/qcsrc/client/casings.qc index d4d1041c8..a43d1726f 100644 --- a/qcsrc/client/casings.qc +++ b/qcsrc/client/casings.qc @@ -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()