| 458 | } |
| 459 | |
| 460 | bool ItemNearTarget(const Vector3i& origin, ItemInfo* targetEntity, int radius) |
| 461 | { |
| 462 | auto pos = origin - targetEntity->Pose.Position; |
| 463 | |
| 464 | if (!ItemCollide(pos.y, ITEM_RADIUS_YMAX)) |
| 465 | return false; |
| 466 | |
| 467 | if (!ItemCollide(pos.x, radius) || !ItemCollide(pos.z, radius)) |
| 468 | return false; |
| 469 | |
| 470 | if (!ItemInRange(pos.x, pos.z, radius)) |
| 471 | return false; |
| 472 | |
| 473 | auto bounds = GameBoundingBox(targetEntity); |
| 474 | if (pos.y >= bounds.Y1 && pos.y <= bounds.Y2) |
| 475 | return true; |
| 476 | |
| 477 | return false; |
| 478 | } |
| 479 | |
| 480 | bool Move3DPosTo3DPos(ItemInfo* item, Pose& fromPose, const Pose& toPose, int velocity, short turnRate) |
| 481 | { |
no test coverage detected