void CampaignPreIntermission()
{
- entity head;
- float won;
- float lost;
+ int won = 0;
+ int lost = 0;
string savevar;
- won = lost = 0;
-
- head = findchain(classname, "player");
- while(head)
- {
- if(IS_REAL_CLIENT(head))
- {
- if(head.winning)
- won = won + 1;
- else
- lost = lost + 1;
- }
- head = head.chain;
- }
+ FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it), LAMBDA(
+ if(it.winning)
+ won += 1;
+ else
+ lost += 1;
+ ));
if(autocvar__campaign_testrun)
{