CreateWaypointAction.cpp 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. ** Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
  3. **
  4. ** File: CreateWaypointAction.cpp
  5. **
  6. ** Author:
  7. **
  8. ** Description:
  9. ** Implementation of the training library "CreateWaypointAction" interface.
  10. **
  11. ** History:
  12. */
  13. #include "pch.h"
  14. #include "CreateWaypointAction.h"
  15. namespace Training
  16. {
  17. //------------------------------------------------------------------------------
  18. // class methods
  19. //------------------------------------------------------------------------------
  20. /* void */ CreateWaypointAction::CreateWaypointAction (BuoyID buoyID, const Vector& position, SectorID sectorID) :
  21. CreateObjectAction (OT_buoy, &m_buoyData, sizeof (m_buoyData)),
  22. m_buoyID (buoyID),
  23. m_position (position),
  24. m_sectorID (sectorID)
  25. {
  26. }
  27. //------------------------------------------------------------------------------
  28. /* void */ CreateWaypointAction::~CreateWaypointAction (void)
  29. {
  30. }
  31. //------------------------------------------------------------------------------
  32. void CreateWaypointAction::Execute (void)
  33. {
  34. ImissionIGC* pMission = trekClient.GetCore();
  35. // create the waypoint object
  36. m_buoyData.position = m_position;
  37. m_buoyData.type = c_buoyWaypoint;
  38. m_buoyData.clusterID = m_sectorID;
  39. m_buoyData.buoyID = m_buoyID;
  40. CreateObjectAction::Execute ();
  41. }
  42. //------------------------------------------------------------------------------
  43. }