MCPcopy Create free account
hub / github.com/assaultcube/AC / loopi

Function loopi

source/src/clientgame.cpp:749–755  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 4

findplayerstartFunction · 0.70
pstat_weapFunction · 0.70
zapplayerflagsFunction · 0.70
preparectfFunction · 0.70

Calls 4

findentityFunction · 0.85
nearestenemyFunction · 0.85
vecClass · 0.85
callvoteFunction · 0.85

Tested by

no test coverage detected