f = ctf_worldflaglist;
while (f)
{
- if (bot.team == f.team)
+ if (!ctf_IsDifferentTeam(bot, f))
return f;
f = f.ctf_worldflagnext;
}
f = ctf_worldflaglist;
while (f)
{
- if (bot.team != f.team)
+ if (ctf_IsDifferentTeam(bot, f))
return f;
f = f.ctf_worldflagnext;
}
head = ctf_worldflaglist;
while (head)
{
- if (self.team == head.team)
+ if (!ctf_IsDifferentTeam(self, head))
break;
head = head.ctf_worldflagnext;
}
head = ctf_worldflaglist;
while (head)
{
- if (self.team == head.team)
+ if (!ctf_IsDifferentTeam(self, head))
break;
head = head.ctf_worldflagnext;
}
head = ctf_worldflaglist;
while (head)
{
- if (self.team != head.team)
+ if (ctf_IsDifferentTeam(self, head))
break;
head = head.ctf_worldflagnext;
}