home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2006 March / Gamestar_82_2006-03_dvd.iso / DVDStar / Editace / quake4_sdkv10.exe / source / game / mp / CTF.h < prev    next >
C/C++ Source or Header  |  2005-11-14  |  2KB  |  85 lines

  1. //----------------------------------------------------------------
  2. // CTF.h
  3. //
  4. // Copyright 2002-2004 Raven Software
  5. //----------------------------------------------------------------
  6.  
  7. #ifndef __CTF_H__
  8. #define __CTF_H__
  9.  
  10. #include "../Game_local.h"
  11. #include "../MultiplayerGame.h"
  12.  
  13. /*
  14. ===============================================================================
  15.  
  16. rvCTF_AssaultPoint
  17.  
  18. ===============================================================================
  19. */
  20.  
  21. class rvCTF_AssaultPoint : public idEntity {
  22. public:
  23.     CLASS_PROTOTYPE( rvCTF_AssaultPoint );
  24.     void    Spawn( void );
  25.  
  26.     rvCTF_AssaultPoint();
  27.     ~rvCTF_AssaultPoint();
  28.  
  29.     int GetOwner( void ); 
  30.     int GetIndex( void ); 
  31.     
  32.     void SetOwnerColor ( void );
  33.     void SetOwner ( int newOwner );
  34.     void Reset ( void );
  35.  
  36. private:
  37.     void    Event_Touch( idEntity *activator, trace_t *trace );
  38.     void    Event_InitializeLinks( void );
  39.     void    ResetSpawns( int team );    
  40.     
  41.     void    ResetIndices( void );
  42.     
  43.     // these could be maintained as lists to allow multiple AP paths
  44.     // the assault point one step closer to the Strogg base
  45.     idEntityPtr<idEntity>    toStrogg;
  46.     // the assault point one step closer to the Marine base
  47.     idEntityPtr<idEntity>    toMarine;
  48.  
  49.     // who currently owns this assault point
  50.     int    owner;
  51.     int index;
  52.     bool linked;
  53.  
  54.     idClipModel* trigger;
  55. };
  56.  
  57. ID_INLINE int rvCTF_AssaultPoint::GetOwner( void ) {
  58.     return owner;
  59. }
  60.  
  61. ID_INLINE int rvCTF_AssaultPoint::GetIndex( void ) {
  62.     return index;
  63. }
  64.  
  65. /*
  66. ===============================================================================
  67.  
  68. rvCTFAssaultPlayerStart
  69.  
  70. ===============================================================================
  71. */
  72. class rvCTFAssaultPlayerStart : public idPlayerStart {
  73. public:
  74.     CLASS_PROTOTYPE( rvCTFAssaultPlayerStart );
  75.  
  76.     void                Spawn( void );
  77.  
  78.     int                    GetTeam( void );
  79. private:
  80.     void                Event_Activate( idEntity *activator );
  81.     int                    team;
  82. };
  83.  
  84. #endif
  85.