find entity of closest distance in desired solid angle
| 179 | if(best < 0) |
| 180 | { // find entity of closest distance in desired solid angle |
| 181 | loopv(ents) |
| 182 | { |
| 183 | entity &e = ents[i]; |
| 184 | if(!(enttypemask & (1 << e.type))) continue; |
| 185 | if(intersectangular(camera1->o, worldpos, vec(e.x, e.y, e.z), maxangle, dist) && dist < bdist) |
| 186 | { |
| 187 | best = i; |
| 188 | bdist = dist; |
| 189 | } |
| 190 | } |
| 191 | |
| 192 | if(best >= 0) |
| 193 | { // if closest ent shares location with other ents, pick one with clentsel |
no test coverage detected