| 322 | } |
| 323 | |
| 324 | S32 NPCTarget::InCylinder(xVec3* from, F32 rad, F32 hyt, F32 off) |
| 325 | { |
| 326 | S32 inrange = 1; |
| 327 | |
| 328 | xVec3 vec = {}; |
| 329 | this->PosGet(&vec); |
| 330 | xVec3SubFrom(&vec, from); |
| 331 | |
| 332 | F32 upper = hyt + off; |
| 333 | F32 lower = upper - hyt; |
| 334 | |
| 335 | if (vec.y > upper) |
| 336 | { |
| 337 | inrange = 0; |
| 338 | } |
| 339 | else if (vec.y < lower) |
| 340 | { |
| 341 | inrange = 0; |
| 342 | } |
| 343 | else if (xVec3Length2(&vec) > SQ(rad)) |
| 344 | { |
| 345 | inrange = 0; |
| 346 | } |
| 347 | |
| 348 | return inrange; |
| 349 | } |
| 350 | |
| 351 | S32 NPCTarget::IsDead() |
| 352 | { |
no test coverage detected