fire burner: abort searching for owner after 16 steps
authorRudolf Polzer <divverent@alientrap.org>
Tue, 19 Oct 2010 19:46:46 +0000 (21:46 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Tue, 19 Oct 2010 19:46:46 +0000 (21:46 +0200)
qcsrc/server/g_damage.qc

index 76cb7861498c7820ea603c9ad2b118b4f8f48951..c7336356cae0363a2a8e79a4bd8bff10775c82e8 100644 (file)
@@ -1154,9 +1154,7 @@ void Fire_ApplyDamage(entity e)
        if not(Fire_IsBurning(e))
                return;
 
-       o = e.owner;
-       while(o.owner)
-               o = o.owner;
+       for(t = 0, o = e.owner; o.owner && t < 16; o = o.owner, ++t);
        if(clienttype(o) == CLIENTTYPE_NOTACLIENT)
                o = e.fire_owner;