void RubbleLimit(string cname, float limit, void(entity) deleteproc)
{
- SELFPARAM();
entity e;
entity oldest;
float c;
while (1)
{
e = findchain(classname, cname);
- if (e == world) break;
+ if (e == NULL) break;
// walk the list and count the entities, find the oldest
// initialize our search with the first entity
c = 1;