| 62 | } |
| 63 | |
| 64 | void lara_col_fly_cheat(ItemInfo* item, CollisionInfo* coll) |
| 65 | { |
| 66 | auto& player = GetLaraInfo(*item); |
| 67 | |
| 68 | if (item->Pose.Orientation.x < ANGLE(-90.0f) || |
| 69 | item->Pose.Orientation.x > ANGLE(90.0f)) |
| 70 | { |
| 71 | player.Control.MoveAngle = item->Pose.Orientation.y + ANGLE(180.0f); |
| 72 | coll->Setup.ForwardAngle = item->Pose.Orientation.y - ANGLE(180.0f); |
| 73 | } |
| 74 | else |
| 75 | { |
| 76 | player.Control.MoveAngle = item->Pose.Orientation.y; |
| 77 | coll->Setup.ForwardAngle = item->Pose.Orientation.y; |
| 78 | } |
| 79 | |
| 80 | int height = abs(LARA_HEIGHT * phd_sin(item->Pose.Orientation.x)); |
| 81 | auto offset = Vector3i(0, height / 2, 0); |
| 82 | |
| 83 | coll->Setup.UpperFloorBound = -CLICK(0.25f); |
| 84 | coll->Setup.Height = height; |
| 85 | |
| 86 | GetCollisionInfo(coll, item, offset); |
| 87 | |
| 88 | auto coll0 = *coll; |
| 89 | coll0.Setup.ForwardAngle += ANGLE(45.0f); |
| 90 | GetCollisionInfo(&coll0, item, offset); |
| 91 | |
| 92 | auto coll1 = *coll; |
| 93 | coll1.Setup.ForwardAngle -= ANGLE(45.0f); |
| 94 | GetCollisionInfo(&coll1, item, offset); |
| 95 | |
| 96 | ShiftItem(item, coll); |
| 97 | |
| 98 | if (coll->Middle.Floor < 0 && |
| 99 | coll->Middle.Floor != NO_HEIGHT) |
| 100 | { |
| 101 | item->Pose.Position.y += coll->Middle.Floor; |
| 102 | } |
| 103 | } |
| 104 | } |
nothing calls this directly
no test coverage detected