| 123 | } |
| 124 | |
| 125 | void InitializeLaraAnims(ItemInfo* item) |
| 126 | { |
| 127 | auto& player = GetLaraInfo(*item); |
| 128 | |
| 129 | player.Control.HandStatus = HandStatus::Free; |
| 130 | player.TargetEntity = nullptr; |
| 131 | player.LeftArm.FrameNumber = 0; |
| 132 | player.RightArm.FrameNumber = 0; |
| 133 | player.LeftArm.Locked = false; |
| 134 | player.RightArm.Locked = false; |
| 135 | |
| 136 | if (PlayerVehicleObjectID != GAME_OBJECT_ID::ID_NO_OBJECT) |
| 137 | return; |
| 138 | |
| 139 | if (TestEnvironment(ENV_FLAG_WATER, item)) |
| 140 | { |
| 141 | SetAnimation(item, LA_UNDERWATER_IDLE); |
| 142 | item->Animation.Velocity.y = 0.0f; |
| 143 | player.Control.WaterStatus = WaterStatus::Underwater; |
| 144 | } |
| 145 | else |
| 146 | { |
| 147 | player.Control.WaterStatus = WaterStatus::Dry; |
| 148 | |
| 149 | // Allow player to start in crawl idle anim if start position is too low. |
| 150 | auto pointColl = GetPointCollision(*item); |
| 151 | if (abs(pointColl.GetCeilingHeight() - pointColl.GetFloorHeight()) < LARA_HEIGHT) |
| 152 | { |
| 153 | SetAnimation(item, LA_CRAWL_IDLE); |
| 154 | player.Control.IsLow = |
| 155 | player.Control.KeepLow = true; |
| 156 | } |
| 157 | else |
| 158 | { |
| 159 | SetAnimation(item, LA_STAND_SOLID); |
| 160 | } |
| 161 | } |
| 162 | } |
| 163 | |
| 164 | void InitializeLaraLoad(short itemNumber) |
| 165 | { |
no test coverage detected