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

  1. //----------------------------------------------------------------
  2. // ClientMoveable.h
  3. //
  4. // Copyright 2002-2004 Raven Software
  5. //----------------------------------------------------------------
  6.  
  7. #ifndef __GAME_CLIENT_MOVEABLE_H__
  8. #define __GAME_CLIENT_MOVEABLE_H__
  9.  
  10. class rvClientMoveable : public rvClientEntity {
  11. public:
  12.  
  13.     CLASS_PROTOTYPE( rvClientMoveable );
  14.  
  15.     rvClientMoveable ( void );
  16.     virtual ~rvClientMoveable ( void );
  17.     
  18.     virtual void            Spawn            ( const idDict* spawnArgs, idEntity* owner = NULL );
  19.     virtual void            Think            ( void );
  20.     virtual idPhysics*        GetPhysics        ( void ) const;    
  21.     virtual bool            Collide            ( const trace_t &collision, const idVec3 &velocity );
  22.     
  23.     renderEntity_t*            GetRenderEntity    ( void );
  24.  
  25.     void                    Save            ( idSaveGame *savefile ) const;
  26.     void                    Restore            ( idRestoreGame *savefile );
  27.     
  28.     static void                SpawnClientMoveables ( idEntity* ent, const char *type, idList<rvClientMoveable *>* list );
  29.  
  30.     virtual void            FreeEntityDef     ( void );
  31.  
  32. protected:
  33.     renderEntity_t            renderEntity;
  34.     int                        entityDefHandle;
  35.  
  36.     rvClientEffectPtr        trailEffect;
  37.     float                    trailAttenuateSpeed;
  38.         
  39.     idPhysics_RigidBody        physicsObj;
  40.     
  41.     int                        bounceSoundTime;
  42.     const idSoundShader*    bounceSoundShader;
  43.     bool                    mPlayBounceSoundOnce;
  44.     bool                    mHasBounced;
  45.  
  46.     idInterpolate<float>    scale;
  47.     
  48. private:
  49.     
  50.     void                    Event_FadeOut            ( int duration );
  51.     void                    Event_ClearDepthHack    ( void );
  52. };
  53.  
  54. ID_INLINE renderEntity_t* rvClientMoveable::GetRenderEntity ( void ) {
  55.     return &renderEntity;
  56. }
  57.  
  58. extern const idEventDef CL_FadeOut;
  59. extern const idEventDef CL_ClearDepthHack;
  60.  
  61. #define SIMPLE_TRI_NAME        "simpletri"
  62.  
  63. extern idVec3 simpleTri[3];
  64.  
  65.  
  66. #endif // __GAME_CLIENT_MOVEABLE_H__
  67.