home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 June / PCFJune.iso / Xenon / XenonSource.exe / xenon / source / shipengine.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2000-07-19  |  886 b   |  47 lines

  1. //-------------------------------------------------------------
  2. //
  3. // Class:    CShipEngine
  4. //
  5. // Author:    John M Phillips
  6. //
  7. // Started:    06/05/00
  8. //
  9. // Base:    CEngine
  10. //
  11. // Derived:    None
  12. //
  13. //-------------------------------------------------------------
  14.  
  15. #include "game.h"
  16.  
  17. //-------------------------------------------------------------
  18.  
  19. CShipEngine::CShipEngine()
  20. {
  21. }
  22.  
  23. //-------------------------------------------------------------
  24.  
  25. CShipEngine::~CShipEngine()
  26. {
  27. }
  28.  
  29. //-------------------------------------------------------------
  30.  
  31. bool CShipEngine::draw()
  32. {
  33.     if (getOwner() &&
  34.         getOwner()->getActorInfo().m_type == ACTOR_TYPE_SHIP &&
  35.         ((CShip *) getOwner())->isCloaked())
  36.         return true;
  37.  
  38.     if (m_thrust > 0) {
  39.         animate(ANIMATE_LOOP);
  40.         CActor::draw();
  41.         }
  42.  
  43.     return false;
  44. }
  45.  
  46. //-------------------------------------------------------------
  47.