| 5 | { |
| 6 | |
| 7 | VehicleControls InfantryController::Poll(float deltaT) |
| 8 | { |
| 9 | auto& input = InputSubsystem::Instance(); |
| 10 | VehicleControls ctrl; |
| 11 | |
| 12 | ctrl.throttle = input.GetAction(UAMoveForward) - input.GetAction(UAMoveBack); |
| 13 | ctrl.steering = input.GetAction(UATurnRight) - input.GetAction(UATurnLeft); |
| 14 | |
| 15 | ctrl.collective = input.GetAction(UAMoveUp) - input.GetAction(UAMoveDown); |
| 16 | |
| 17 | ctrl.roll = input.GetAction(UAMoveRight) - input.GetAction(UAMoveLeft); |
| 18 | |
| 19 | ctrl.fire = input.GetActionToDo(UAFire, false); |
| 20 | ctrl.toggleWeapons = input.GetActionToDo(UAToggleWeapons, false); |
| 21 | ctrl.reloadMagazine = input.GetActionToDo(UAReloadMagazine, false); |
| 22 | ctrl.optics = input.GetActionToDo(UAOptics, false); |
| 23 | |
| 24 | ctrl.lookX = input.GetMouseDeltaX(); |
| 25 | ctrl.lookY = input.GetMouseDeltaY(); |
| 26 | ctrl.lookAround = input.IsLookAroundEnabled(); |
| 27 | |
| 28 | ctrl.turbo = input.GetAction(UATurbo) > 0.0f; |
| 29 | ctrl.slow = input.GetAction(UASlow) > 0.0f; |
| 30 | |
| 31 | return ctrl; |
| 32 | } |
| 33 | } // namespace Poseidon |
nothing calls this directly
no test coverage detected