| 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 |
no test coverage detected