X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Frubble.qc;h=5af2e235070f7c5d7b63f2fc3d30353f0f206cfd;hb=923e5ae945f2ef5eada538c6f7b6cdf52d1695d9;hp=4e32c0c45490fc9451c17504c5bafb7483368701;hpb=88713a575bd27dabc5926d636542b6145ab6f51c;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/rubble.qc b/qcsrc/client/rubble.qc index 4e32c0c45..5af2e2350 100644 --- a/qcsrc/client/rubble.qc +++ b/qcsrc/client/rubble.qc @@ -3,15 +3,12 @@ // LordHavoc: rewrote this file, it was really bad code void RubbleLimit(string cname, float limit, void() deleteproc) -{ +{SELFPARAM(); entity e; entity oldest; - entity oldself; float c; float oldesttime; - oldself = self; - // remove rubble of the same type if it's at the limit // remove multiple rubble if the limit has been decreased while(1) @@ -42,9 +39,7 @@ void RubbleLimit(string cname, float limit, void() deleteproc) break; // delete this oldest one and search again - self = oldest; - deleteproc(); - self = oldself; + WITH(entity, self, oldest, deleteproc()); } }