MCPcopy Index your code
hub / github.com/assaultcube/AC / loopv

Function loopv

source/src/weapon.cpp:356–367  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

354 hitzone = zone;
355 }
356 loopv(players)
357 {
358 playerent *o = players[i];
359 if(!o || o==at || (o->state!=CS_ALIVE && (aiming || (o->state!=CS_EDITING && o->state!=CS_LAGGED)))) continue;
360 float distsquared = at->o.squareddist(o->o);
361 if(distsquared < bestdistsquared && (zone = intersect(o, from, to)))
362 {
363 best = o;
364 bestdistsquared = distsquared;
365 hitzone = zone;
366 }
367 }
368 return best;
369}
370

Callers 4

removebounceentsFunction · 0.70
movebounceentsFunction · 0.70
clearbounceentsFunction · 0.70
accuracyinfoFunction · 0.70

Calls 5

intersectFunction · 0.85
copystringFunction · 0.85
rendermodelFunction · 0.85
radialeffectFunction · 0.85
squareddistMethod · 0.80

Tested by

no test coverage detected