| 386 | } |
| 387 | |
| 388 | GameVector GetTargetPoint(ItemInfo& targetEntity) |
| 389 | { |
| 390 | const auto& bounds = GetClosestKeyframe(targetEntity).BoundingBox; |
| 391 | |
| 392 | auto center = Vector3i( |
| 393 | (bounds.X1 + bounds.X2) / 2, |
| 394 | bounds.Y1 + (bounds.GetHeight() / 3), |
| 395 | (bounds.Z1 + bounds.Z2) / 2); |
| 396 | |
| 397 | float sinY = phd_sin(targetEntity.Pose.Orientation.y); |
| 398 | float cosY = phd_cos(targetEntity.Pose.Orientation.y); |
| 399 | |
| 400 | return GameVector( |
| 401 | targetEntity.Pose.Position.x + ((center.x * cosY) + (center.z * sinY)), |
| 402 | targetEntity.Pose.Position.y + center.y, |
| 403 | targetEntity.Pose.Position.z + ((center.z * cosY) - (center.x * sinY)), |
| 404 | targetEntity.RoomNumber); |
| 405 | } |
| 406 | |
| 407 | HolsterSlot GetWeaponHolsterSlot(LaraWeaponType weaponType) |
| 408 | { |
no test coverage detected