ToggleWeaponAction.cpp 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. ** Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
  3. **
  4. ** File: ToggleWeaponAction.cpp
  5. **
  6. ** Author:
  7. **
  8. ** Description:
  9. ** Implementation of the training library "ToggleWeaponAction" interface.
  10. **
  11. ** History:
  12. */
  13. #include "pch.h"
  14. #include "ToggleWeaponAction.h"
  15. namespace Training
  16. {
  17. //------------------------------------------------------------------------------
  18. // class methods
  19. //------------------------------------------------------------------------------
  20. /* void */ ToggleWeaponAction::ToggleWeaponAction (Mount mount) :
  21. m_mount (mount)
  22. {
  23. }
  24. //------------------------------------------------------------------------------
  25. /* void */ ToggleWeaponAction::~ToggleWeaponAction (void)
  26. {
  27. }
  28. //------------------------------------------------------------------------------
  29. void ToggleWeaponAction::Execute (void)
  30. {
  31. // This is the functionality
  32. /*
  33. Mount mountSelected = (trekClient.GetShip ()->GetStateM () & selectedWeaponMaskIGC) >> selectedWeaponShiftIGC;
  34. if (mountSelected == m_mount)
  35. {
  36. trekClient.fGroupFire = true;
  37. }
  38. else
  39. {
  40. trekClient.SetSelectedWeapon (m_mount);
  41. trekClient.fGroupFire = false;
  42. }
  43. */
  44. // This uses the normal key press interface
  45. GetWindow ()->ToggleWeapon (m_mount);
  46. }
  47. //------------------------------------------------------------------------------
  48. }