| 769 | } |
| 770 | |
| 771 | bool CanFall(const ItemInfo& item, const CollisionInfo& coll) |
| 772 | { |
| 773 | constexpr auto UPPER_FLOOR_BOUND = STEPUP_HEIGHT; |
| 774 | |
| 775 | const auto& player = GetLaraInfo(item); |
| 776 | |
| 777 | // 1) Test player water status. |
| 778 | if (player.Control.WaterStatus == WaterStatus::Wade) |
| 779 | return false; |
| 780 | |
| 781 | // Get point collision. |
| 782 | auto pointColl = GetPointCollision(item, 0, 0, -coll.Setup.Height / 2); |
| 783 | int relFloorHeight = pointColl.GetFloorHeight() - item.Pose.Position.y; |
| 784 | |
| 785 | // 2) Assess point collision. |
| 786 | if (relFloorHeight > UPPER_FLOOR_BOUND) // Floor height is below upper floor bound. |
| 787 | return true; |
| 788 | |
| 789 | return false; |
| 790 | } |
| 791 | |
| 792 | bool CanLand(const ItemInfo& item, const CollisionInfo& coll) |
| 793 | { |
no test coverage detected