| 885 | } |
| 886 | |
| 887 | bool TestPlayerWaterStepOut(ItemInfo* item, CollisionInfo* coll) |
| 888 | { |
| 889 | auto& player = GetLaraInfo(*item); |
| 890 | |
| 891 | // Get point collision. |
| 892 | auto pointColl = GetPointCollision(*item); |
| 893 | int vPos = item->Pose.Position.y; |
| 894 | |
| 895 | if (coll->CollisionType == CollisionType::Front || |
| 896 | pointColl.IsSteepFloor() || |
| 897 | (pointColl.GetFloorHeight() - vPos) <= 0) |
| 898 | { |
| 899 | return false; |
| 900 | } |
| 901 | |
| 902 | if (coll->Middle.Floor >= -CLICK(0.5f)) |
| 903 | { |
| 904 | SetAnimation(item, LA_STAND_IDLE); |
| 905 | } |
| 906 | else |
| 907 | { |
| 908 | SetAnimation(item, LA_ONWATER_TO_WADE_1_STEP); |
| 909 | item->Animation.TargetState = LS_IDLE; |
| 910 | } |
| 911 | |
| 912 | item->Pose.Position.y = pointColl.GetFloorHeight(); |
| 913 | UpdateLaraRoom(item, -(STEPUP_HEIGHT - 3)); |
| 914 | |
| 915 | ResetPlayerLean(item); |
| 916 | item->Animation.Velocity.y = 0.0f; |
| 917 | item->Animation.Velocity.z = 0.0f; |
| 918 | item->Animation.IsAirborne = false; |
| 919 | player.Control.WaterStatus = WaterStatus::Wade; |
| 920 | |
| 921 | return true; |
| 922 | } |
| 923 | |
| 924 | bool TestLaraWaterClimbOut(ItemInfo* item, CollisionInfo* coll) |
| 925 | { |
no test coverage detected