| 747 | float bestdist = -1; |
| 748 | |
| 749 | loopi(r) |
| 750 | { |
| 751 | spawncycle = clentstats.hasffaspawns ? findentity(PLAYERSTART, spawncycle+1, 100) : findentity(PLAYERSTART, spawncycle+1); // if not enough ffa-spawns are available, use all |
| 752 | if(spawncycle < 0) continue; |
| 753 | float dist = nearestenemy(vec(ents[spawncycle].x, ents[spawncycle].y, ents[spawncycle].z), d->team); |
| 754 | if(!e || dist < 0 || (bestdist >= 0 && dist > bestdist)) { e = &ents[spawncycle]; bestdist = dist; } |
| 755 | } |
| 756 | } |
| 757 | } |
| 758 |
no test coverage detected