State: LS_WALK_BACK (16) Control: lara_as_walk_back()
| 1079 | // State: LS_WALK_BACK (16) |
| 1080 | // Control: lara_as_walk_back() |
| 1081 | void lara_col_walk_back(ItemInfo* item, CollisionInfo* coll) |
| 1082 | { |
| 1083 | auto& player = GetLaraInfo(*item); |
| 1084 | |
| 1085 | bool isWading = (player.Control.WaterStatus == WaterStatus::Wade); |
| 1086 | |
| 1087 | player.Control.MoveAngle = item->Pose.Orientation.y + ANGLE(180.0f); |
| 1088 | item->Animation.IsAirborne = false; |
| 1089 | item->Animation.Velocity.y = 0; |
| 1090 | coll->Setup.LowerFloorBound = isWading ? NO_LOWER_BOUND : STEPUP_HEIGHT; |
| 1091 | coll->Setup.UpperFloorBound = -STEPUP_HEIGHT; |
| 1092 | coll->Setup.LowerCeilingBound = 0; |
| 1093 | coll->Setup.BlockFloorSlopeDown = !isWading; |
| 1094 | coll->Setup.BlockFloorSlopeUp = !isWading; |
| 1095 | coll->Setup.BlockDeathFloorDown = true; |
| 1096 | coll->Setup.ForwardAngle = player.Control.MoveAngle; |
| 1097 | GetCollisionInfo(coll, item); |
| 1098 | |
| 1099 | if (TestLaraHitCeiling(coll)) |
| 1100 | { |
| 1101 | SetLaraHitCeiling(item, coll); |
| 1102 | return; |
| 1103 | } |
| 1104 | |
| 1105 | if (CanFall(*item, *coll)) |
| 1106 | { |
| 1107 | SetLaraFallAnimation(item); |
| 1108 | return; |
| 1109 | } |
| 1110 | |
| 1111 | if (CanSlide(*item, *coll)) |
| 1112 | { |
| 1113 | SetLaraSlideAnimation(item, coll); |
| 1114 | return; |
| 1115 | } |
| 1116 | |
| 1117 | if (LaraDeflectEdge(item, coll)) |
| 1118 | LaraCollideStop(item, coll); |
| 1119 | |
| 1120 | if (CanChangeElevation(*item, *coll)) |
| 1121 | { |
| 1122 | HandlePlayerElevationChange(item, coll); |
| 1123 | return; |
| 1124 | } |
| 1125 | } |
| 1126 | |
| 1127 | // State: LS_TURN_RIGHT_FAST (20), LS_TURN_LEFT_FAST (152) |
| 1128 | // Collision: lara_col_turn_fast() |
nothing calls this directly
no test coverage detected