dayzplayerimplementvehicle.c 528 B

1234567891011121314151617181920212223242526
  1. class GearChangeActionCallback : HumanCommandActionCallback
  2. {
  3. // Left for backwards compatibility, but never ever store HumanCommandVehicle in a variable used later
  4. HumanCommandVehicle m_hcv;
  5. void SetVehicleCommand(HumanCommandVehicle hcv)
  6. {
  7. //m_hcv = hcv;
  8. hcv.SetClutchState(true);
  9. }
  10. //Command events
  11. override void OnFinish(bool pCanceled)
  12. {
  13. Human owner = GetHuman();
  14. if (owner)
  15. {
  16. HumanCommandVehicle hcv = owner.GetCommand_Vehicle();
  17. if (hcv)
  18. {
  19. hcv.SetClutchState(false);
  20. }
  21. }
  22. }
  23. };