Change count back to forEach

Can not nest count loops inside other count loops:
https://community.bistudio.com/wiki/Code_Optimisation#forEach_vs_count
This commit is contained in:
ebaydayz
2014-07-31 14:00:50 -04:00
parent ceae17af98
commit 6d1d4c998a

View File

@@ -863,7 +863,7 @@ server_spawnCleanLoot = {
}; };
}; };
sleep 0.001; sleep 0.001;
} count _missionObjs; } forEach _missionObjs;
if (_delQty > 0) then { if (_delQty > 0) then {
_qty = count _missionObjs; _qty = count _missionObjs;
diag_log (format["CLEANUP: Deleted %1 Loot Piles out of %2",_delQty,_qty]); diag_log (format["CLEANUP: Deleted %1 Loot Piles out of %2",_delQty,_qty]);
@@ -894,7 +894,7 @@ server_spawnCleanAnimals = {
}; };
}; };
sleep 0.001; sleep 0.001;
} count _missonAnimals; } forEach _missonAnimals;
if (_delQtyAnimal > 0) then { if (_delQtyAnimal > 0) then {
_qty = count _missonAnimals; _qty = count _missonAnimals;
diag_log (format["CLEANUP: Deleted %1 Animals out of %2",_delQtyAnimal,_qty]); diag_log (format["CLEANUP: Deleted %1 Animals out of %2",_delQtyAnimal,_qty]);