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

  1.  
  2. #ifndef __GAME_MOVER_H__
  3. #define __GAME_MOVER_H__
  4.  
  5. extern const idEventDef EV_TeamBlocked;
  6. extern const idEventDef EV_PartBlocked;
  7. extern const idEventDef EV_ReachedPos;
  8. extern const idEventDef EV_ReachedAng;
  9.  
  10. // RAVEN BEGIN
  11. // bdube: more externs
  12. extern const idEventDef EV_Door_Lock;
  13. extern const idEventDef EV_Door_IsLocked;
  14. // abahr:
  15. extern const idEventDef EV_GetSplineEntity;
  16. extern const idEventDef EV_MoveAlongVector;
  17. extern const idEventDef EV_Door_Open;
  18. extern const idEventDef EV_Door_Close;
  19. extern const idEventDef EV_Door_IsOpen;
  20. extern const idEventDef EV_Move;
  21. extern const idEventDef EV_RotateOnce;
  22. // twhitaker:
  23. extern const idEventDef EV_Speed;
  24. extern const idEventDef EV_IsActive;
  25. extern const idEventDef EV_IsMoving;
  26.  
  27. // mekberg: spline sampling
  28. #define SPLINE_SAMPLE_RATE    60.0f
  29. // RAVEN END
  30.  
  31. /*
  32. ===============================================================================
  33.  
  34.   General movers.
  35.  
  36. ===============================================================================
  37. */
  38.  
  39. class idMover : public idEntity {
  40. public:
  41.     CLASS_PROTOTYPE( idMover );
  42.  
  43.                             idMover( void );
  44.                             ~idMover( void );
  45.  
  46.     void                    Spawn( void );
  47.  
  48. // RAVEN BEGIN
  49. // mekberg: added
  50.     void                    Think( void );
  51. // RAVEN END
  52.  
  53.     void                    Save( idSaveGame *savefile ) const;
  54.     void                    Restore( idRestoreGame *savefile );
  55.  
  56.     virtual void            Killed( idEntity *inflictor, idEntity *attacker, int damage, const idVec3 &dir, int location );
  57.  
  58.     virtual void            WriteToSnapshot( idBitMsgDelta &msg ) const;
  59.     virtual void            ReadFromSnapshot( const idBitMsgDelta &msg );
  60.  
  61.     virtual void            Hide( void );
  62.     virtual void            Show( void );
  63.  
  64.     void                    SetPortalState( bool open );
  65.  
  66. // RAVEN BEGIN
  67. // mekberg: sounds for splines
  68.     void                    UpdateSplineStage ( void );
  69. // RAVEN END
  70.  
  71. protected:
  72.     typedef enum {
  73.         ACCELERATION_STAGE,
  74.         LINEAR_STAGE,
  75.         DECELERATION_STAGE,
  76.         FINISHED_STAGE
  77.     } moveStage_t;
  78.  
  79.     typedef enum {
  80.         MOVER_NONE,
  81.         MOVER_ROTATING,
  82.         MOVER_MOVING,
  83.         MOVER_SPLINE
  84.     } moverCommand_t;
  85.  
  86.     //
  87.     // mover directions.  make sure to change script/doom_defs.script if you add any, or change their order
  88.     //
  89.     typedef enum {
  90.         DIR_UP                = -1,
  91.         DIR_DOWN            = -2,
  92.         DIR_LEFT            = -3,
  93.         DIR_RIGHT            = -4,
  94.         DIR_FORWARD            = -5,
  95.         DIR_BACK            = -6,
  96.         DIR_REL_UP            = -7,
  97.         DIR_REL_DOWN        = -8,
  98.         DIR_REL_LEFT        = -9,
  99.         DIR_REL_RIGHT        = -10,
  100.         DIR_REL_FORWARD        = -11,
  101.         DIR_REL_BACK        = -12
  102.     } moverDir_t;
  103.  
  104.     typedef struct {
  105.         moveStage_t            stage;
  106.         int                    acceleration;
  107.         int                    movetime;
  108.         int                    deceleration;
  109.         idVec3                dir;
  110.     } moveState_t;
  111.  
  112.     typedef struct {
  113.         moveStage_t            stage;
  114.         int                    acceleration;
  115.         int                    movetime;
  116.         int                    deceleration;
  117.         idAngles            rot;
  118.     } rotationState_t;
  119.  
  120.     idPhysics_Parametric    physicsObj;
  121.  
  122.     void                    Event_OpenPortal( void );
  123.     void                    Event_ClosePortal( void );
  124.     void                    Event_PartBlocked( idEntity *blockingEntity );
  125.  
  126.     void                    MoveToPos( const idVec3 &pos);
  127.     void                    UpdateMoveSound( moveStage_t stage );
  128.     void                    UpdateRotationSound( moveStage_t stage );
  129.     void                    SetGuiStates( const char *state );
  130.     void                    FindGuiTargets( void );
  131.     void                    SetGuiState( const char *key, const char *val ) const;
  132.  
  133.     virtual void            DoneMoving( void );
  134.     virtual void            DoneRotating( void );
  135.     virtual void            BeginMove( idThread *thread = NULL );
  136.     virtual void            BeginRotation( idThread *thread, bool stopwhendone );
  137.     moveState_t                move;
  138.  
  139.     rvStateThread            splineStateThread;
  140.     float                    damage;
  141.  
  142. private:
  143.     rotationState_t            rot;
  144.  
  145.     int                        move_thread;
  146.     int                        rotate_thread;
  147.     idAngles                dest_angles;
  148.     idAngles                angle_delta;
  149.     idVec3                    dest_position;
  150.     idVec3                    move_delta;
  151.     float                    move_speed;
  152.     int                        move_time;
  153.     int                        deceltime;
  154.     int                        acceltime;
  155.     bool                    stopRotation;
  156.     bool                    useSplineAngles;
  157.     bool                    attenuate;
  158.     bool                    useIdleSound;
  159.     idEntityPtr<idEntity>    splineEnt;
  160.     moverCommand_t            lastCommand;
  161.  
  162.     qhandle_t                areaPortal;        // 0 = no portal
  163.  
  164. // mekberg: attenution and sound additions
  165.     float                    maxAttenuation;
  166.     float                    attenuationScale;
  167.     idVec3                    lastOrigin;
  168.     int                        lastTime;
  169.     int                        splineStartTime;
  170. // RAVEN END
  171.  
  172.     idList< idEntityPtr<idEntity> >    guiTargets;
  173.  
  174. // RAVEN BEGIN
  175. // abahr:
  176.     bool                    GetPhysicsToVisualTransform( idVec3 &origin, idMat3 &axis );
  177.     void                    MoveAlongVector( const idVec3& vec );
  178. // RAVEN END
  179.  
  180.     void                    VectorForDir( float dir, idVec3 &vec );
  181.     idCurve_Spline<idVec3> *GetSpline( idEntity *splineEntity ) const;
  182.  
  183.     void                    Event_SetCallback( void );    
  184.     void                    Event_TeamBlocked( idEntity *blockedPart, idEntity *blockingEntity );
  185.     void                    Event_StopMoving( void );
  186.     void                    Event_StopRotating( void );
  187.     void                    Event_UpdateMove( void );
  188.     void                    Event_UpdateRotation( void );
  189.     void                    Event_SetMoveSpeed( float speed );
  190.     void                    Event_SetMoveTime( float time );
  191.     void                    Event_SetDecelerationTime( float time );
  192.     void                    Event_SetAccellerationTime( float time );
  193.     void                    Event_MoveTo( idEntity *ent );
  194.     void                    Event_MoveToPos( idVec3 &pos );
  195.     void                    Event_MoveDir( float angle, float distance );
  196.     void                    Event_MoveAccelerateTo( float speed, float time );
  197.     void                    Event_MoveDecelerateTo( float speed, float time );
  198.     void                    Event_RotateDownTo( int axis, float angle );
  199.     void                    Event_RotateUpTo( int axis, float angle );
  200.     void                    Event_RotateTo( idAngles &angles );
  201.     void                    Event_Rotate( idAngles &angles );
  202.     void                    Event_RotateOnce( idAngles &angles );
  203.     void                    Event_Bob( float speed, float phase, idVec3 &depth );
  204.     void                    Event_Sway( float speed, float phase, idAngles &depth );
  205.     void                    Event_SetAccelSound( const char *sound );
  206.     void                    Event_SetDecelSound( const char *sound );
  207. // RAVEN BEGIN
  208. // cnicholson: added stop sound support
  209.     void                    Event_SetStoppedSound( const char *sound );
  210. // RAVEN END
  211.     void                    Event_SetMoveSound( const char *sound );
  212.     void                    Event_FindGuiTargets( void );
  213.     void                    Event_InitGuiTargets( void );
  214.     void                    Event_EnableSplineAngles( void );
  215.     void                    Event_DisableSplineAngles( void );
  216.     void                    Event_RemoveInitialSplineAngles( void );
  217.     void                    Event_StartSpline( idEntity *splineEntity );
  218.     void                    Event_StopSpline( void );
  219.     void                    Event_Activate( idEntity *activator );
  220. // RAVEN BEGIN
  221.     void                    Event_PostRestoreExt( int start, int total, int accel, int decel, bool useSplineAng );
  222. // RAVEN END
  223.     void                    Event_IsMoving( void );
  224.     void                    Event_IsRotating( void );
  225. // RAVEN BEGIN
  226. // abahr:
  227.     void                    Event_GetSplineEntity();
  228.     void                    Event_MoveAlongVector( const idVec3& vec );
  229.  
  230. // mekberg: spline states
  231.     CLASS_STATES_PROTOTYPE ( idMover );
  232.  
  233.     stateResult_t            State_Accel( const stateParms_t& parms );
  234.     stateResult_t            State_Linear( const stateParms_t& parms );
  235.     stateResult_t            State_Decel( const stateParms_t& parms );
  236. // RAVEN END
  237. };
  238.  
  239. class idSplinePath : public idEntity {
  240. public:
  241.     CLASS_PROTOTYPE( idSplinePath );
  242.  
  243.                             idSplinePath();
  244.                             ~idSplinePath();
  245.  
  246.     void                    Spawn( void );
  247.  
  248. // RAVEN BEGIN
  249. // abahr: so we can ignore these if needed
  250.     void                    Toggle() { SetActive(!active); }
  251.     void                    Activate() { SetActive(true); }
  252.     void                    Deactivate() { SetActive(false); }
  253.  
  254.     bool                    IsActive() const { return active; }
  255.  
  256.     int                        SortTargets();
  257.     int                        SortBackwardsTargets();
  258.     int                        SortTargets( idList< idEntityPtr<idEntity> >& list );
  259.     void                    RemoveNullTargets( void );
  260.     void                    ActivateTargets( idEntity *activator ) const;
  261.  
  262.     void                    RemoveNullTargets( idList< idEntityPtr<idEntity> >& list );
  263.     void                    ActivateTargets( idEntity *activator, const idList< idEntityPtr<idEntity> >& list ) const;
  264.  
  265.     void                    Save( idSaveGame *savefile ) const;
  266.     void                    Restore( idRestoreGame *savefile );
  267.  
  268.     idList< idEntityPtr<idEntity> >    backwardPathTargets;
  269.  
  270. // mekberg: spline sampling
  271.     float                    GetSampledTime ( float distance ) const;
  272.  
  273. protected:
  274.     void                    SetActive( bool activate ) { active = activate; }
  275.     virtual void            FindTargets();
  276.  
  277.     void                    Event_Toggle( idEntity* activator ) { Toggle(); }
  278.     void                    Event_IsActive();
  279.  
  280. // mekberg: spline sampling
  281.     void                    SampleSpline ( void );
  282.  
  283. protected:
  284.     bool                    active;
  285.  
  286. // mekberg: sample splines.
  287.     float*                    sampledTimes;
  288.     float                    sampledSpeed;
  289.     int                        numSamples;
  290. // RAVEN END
  291. };
  292.  
  293.  
  294. struct floorInfo_s {
  295.     idVec3                    pos;
  296.     idStr                    door;
  297.     int                        floor;
  298. };
  299.  
  300. class idElevator : public idMover {
  301. public:
  302.     CLASS_PROTOTYPE( idElevator );
  303.  
  304.                             idElevator( void );
  305.  
  306.     void                    Spawn();
  307.  
  308.     void                    Save( idSaveGame *savefile ) const;
  309.     void                    Restore( idRestoreGame *savefile );
  310.  
  311.     virtual bool            HandleSingleGuiCommand    ( idEntity *entityGui, idLexer *src );
  312.     floorInfo_s *            GetFloorInfo            ( int floor );
  313.  
  314. protected:
  315.     virtual void            DoneMoving( void );
  316.     virtual void            BeginMove( idThread *thread = NULL );
  317.     void                    SpawnTrigger( const idVec3 &pos );
  318.     void                    GetLocalTriggerPosition();
  319.     void                    Event_Touch( idEntity *other, trace_t *trace );
  320.  
  321. // RAVEN BEGIN
  322. // bdube: added
  323.     void                    SetAASAreaState     ( bool enable );
  324.     void                    InitStatusGui     ( idUserInterface* gui );
  325.     void                    UpdateStatusGui     ( idUserInterface* gui );
  326.     void                    UpdateStatusGuis ( void );
  327.     void                    UpdateFloorInfo     ( void );
  328. // RAVEN END
  329.  
  330. private:
  331.     typedef enum {
  332.         INIT,
  333.         IDLE,
  334.         WAITING_ON_DOORS
  335.     } elevatorState_t;
  336.  
  337.     elevatorState_t            state;
  338.     idList<floorInfo_s>        floorInfo;
  339.     int                        currentFloor;
  340.     int                        pendingFloor;
  341.     int                        lastFloor;
  342.     bool                    controlsDisabled;
  343. //    bool                    waitingForPlayerFollowers;
  344.     float                    returnTime;
  345.     int                        returnFloor;
  346.     int                        lastTouchTime;
  347.  
  348.     class idDoor *            GetDoor( const char *name );
  349.     void                    Think( void );
  350.     void                    OpenInnerDoor( void );
  351.     void                    OpenFloorDoor( int floor );
  352.     void                    CloseAllDoors( void );
  353.     void                    DisableAllDoors( void );
  354.     void                    EnableProperDoors( void );
  355.  
  356.     void                    Event_TeamBlocked        ( idEntity *blockedEntity, idEntity *blockingEntity );
  357.     void                    Event_Activate            ( idEntity *activator );
  358.     void                    Event_PostFloorArrival    ( void );
  359.     void                    Event_GotoFloor            ( int floor );
  360.     void                    Event_UpdateFloorInfo    ( void );
  361. };
  362.  
  363.  
  364. /*
  365. ===============================================================================
  366.  
  367.   Binary movers.
  368.  
  369. ===============================================================================
  370. */
  371.  
  372. typedef enum {
  373.     MOVER_POS1,
  374.     MOVER_POS2,
  375.     MOVER_1TO2,
  376.     MOVER_2TO1
  377. } moverState_t;
  378.  
  379. class idMover_Binary : public idEntity {
  380. public:
  381.     CLASS_PROTOTYPE( idMover_Binary );
  382.  
  383.                             idMover_Binary();
  384.                             ~idMover_Binary();
  385.  
  386.     void                    Spawn( void );
  387.  
  388.     void                    Save( idSaveGame *savefile ) const;
  389.     void                    Restore( idRestoreGame *savefile );
  390.  
  391.     virtual void            PreBind( void );
  392.     virtual void            PostBind( void );
  393.  
  394.     void                    Enable( bool b );
  395.     void                    InitSpeed( idVec3 &mpos1, idVec3 &mpos2, float mspeed, float maccelTime, float mdecelTime );
  396.     void                    InitTime( idVec3 &mpos1, idVec3 &mpos2, float mtime, float maccelTime, float mdecelTime );
  397.     void                    GotoPosition1( void );
  398.     void                    GotoPosition2( void );
  399.     void                    Use_BinaryMover( idEntity *activator );
  400.     void                    SetGuiStates( const char *state );
  401.     void                    UpdateBuddies( int val );
  402.     idMover_Binary *        GetActivateChain( void ) const { return activateChain; }
  403.     idMover_Binary *        GetMoveMaster( void ) const { return moveMaster; }
  404.     void                    BindTeam( idEntity *bindTo );
  405.     void                    SetBlocked( bool b );
  406.     bool                    IsBlocked( void );
  407.     idEntity *                GetActivator( void ) const;
  408.  
  409.     virtual void            WriteToSnapshot( idBitMsgDelta &msg ) const;
  410.     virtual void            ReadFromSnapshot( const idBitMsgDelta &msg );
  411.  
  412.     void                    SetPortalState( bool open );
  413.  
  414. protected:
  415.     idVec3                    pos1;
  416.     idVec3                    pos2;
  417.     moverState_t            moverState;
  418.     idMover_Binary *        moveMaster;
  419.     idMover_Binary *        activateChain;
  420.     int                        soundPos1;
  421.     int                        sound1to2;
  422.     int                        sound2to1;
  423.     int                        soundPos2;
  424.     int                        soundLoop;
  425.     float                    wait;
  426.     float                    damage;
  427.     int                        duration;
  428.     int                        accelTime;
  429.     int                        decelTime;
  430.     idEntityPtr<idEntity>    activatedBy;
  431.     int                        stateStartTime;
  432.     idStr                    team;
  433.     bool                    enabled;
  434.     bool                    deferedOpen;
  435.     int                        move_thread;
  436.     int                        updateStatus;        // 1 = lock behaviour, 2 = open close status
  437.     idStrList                buddies;
  438.     idPhysics_Parametric    physicsObj;
  439.     qhandle_t                areaPortal;            // 0 = no portal
  440.     bool                    blocked;
  441.     idList< idEntityPtr<idEntity> >    guiTargets;
  442.  
  443.     void                    MatchActivateTeam( moverState_t newstate, int time );
  444.     void                    JoinActivateTeam( idMover_Binary *master );
  445.  
  446.     void                    UpdateMoverSound( moverState_t state );
  447.     void                    SetMoverState( moverState_t newstate, int time );
  448.     moverState_t            GetMoverState( void ) const { return moverState; }
  449.     void                    FindGuiTargets( void );
  450.     void                    SetGuiState( const char *key, const char *val ) const;
  451.  
  452.     void                    Event_SetCallback( void );
  453.     void                    Event_ReturnToPos1( void );
  454.     void                    Event_Use_BinaryMover( idEntity *activator );
  455.     void                    Event_Reached_BinaryMover( void );
  456.     void                    Event_MatchActivateTeam( moverState_t newstate, int time );
  457.     void                    Event_Enable( void );
  458.     void                    Event_Disable( void );
  459.     void                    Event_OpenPortal( void );
  460.     void                    Event_ClosePortal( void );
  461.     void                    Event_FindGuiTargets( void );
  462.     void                    Event_InitGuiTargets( void );
  463.  
  464.     static void                GetMovedir( float dir, idVec3 &movedir );
  465. };
  466.  
  467. class idDoor : public idMover_Binary {
  468. public:
  469.     CLASS_PROTOTYPE( idDoor );
  470.  
  471.                             idDoor( void );
  472.                             ~idDoor( void );
  473.  
  474.     void                    Spawn( void );
  475.  
  476.     void                    Save( idSaveGame *savefile ) const;
  477.     void                    Restore( idRestoreGame *savefile );
  478.  
  479.     virtual void            Think( void );
  480.     virtual void            PreBind( void );
  481.     virtual void            PostBind( void );
  482.     virtual void            Hide( void );
  483.     virtual void            Show( void );
  484.  
  485.     bool                    IsOpen( void );
  486.     bool                    IsNoTouch( void );
  487.     int                        IsLocked( void );
  488.     void                    Lock( int f );
  489.     void                    Use( idEntity *other, idEntity *activator );
  490.     void                    Close( void );
  491.     void                    Open( void );
  492.     void                    SetCompanion( idDoor *door );
  493.  
  494. // RAVEN BEGIN
  495. // abahr:
  496.     bool                    IsClosed( void ) const { return moverState == MOVER_POS1; }
  497.     void                    SetDoorFrameController( idEntity* controller );
  498.     virtual void            ActivateTargets( idEntity *activator ) const;
  499. // RAVEN END
  500.  
  501. private:
  502.     float                    triggersize;
  503.     bool                    crusher;
  504.     bool                    noTouch;
  505.     bool                    aas_area_closed;
  506.     idStr                    buddyStr;
  507.     idClipModel *            trigger;
  508.     idClipModel *            sndTrigger;
  509.     int                        nextSndTriggerTime;
  510.     idVec3                    localTriggerOrigin;
  511.     idMat3                    localTriggerAxis;
  512.     idStr                    requires;
  513.     int                        removeItem;
  514.     idStr                    syncLock;
  515.     int                        normalAxisIndex;        // door faces X or Y for spectator teleports
  516.     idDoor *                companionDoor;
  517.  
  518. // RAVEN BEGIN
  519. // abahr: so we can route calls through a tramGate
  520.     idEntityPtr<idEntity>    doorFrameController;
  521. // RAVEN END
  522.  
  523.     void                    SetAASAreaState( bool closed );
  524.  
  525.     void                    GetLocalTriggerPosition( const idClipModel *trigger );
  526.     void                    CalcTriggerBounds( float size, idBounds &bounds );
  527.  
  528.     void                    Event_Reached_BinaryMover( void );
  529.     void                    Event_TeamBlocked( idEntity *blockedEntity, idEntity *blockingEntity );
  530.     void                    Event_PartBlocked( idEntity *blockingEntity );
  531.     void                    Event_Touch( idEntity *other, trace_t *trace );
  532.     void                    Event_Activate( idEntity *activator );
  533.     void                    Event_StartOpen( void );
  534.     void                    Event_SpawnDoorTrigger( void );
  535.     void                    Event_SpawnSoundTrigger( void );
  536.     void                    Event_Close( void );
  537.     void                    Event_Open( void );
  538.     void                    Event_Lock( int f );
  539.     void                    Event_IsOpen( void );
  540.     void                    Event_Locked( void );
  541.     void                    Event_SpectatorTouch( idEntity *other, trace_t *trace );
  542.     void                    Event_OpenPortal( void );
  543.     void                    Event_ClosePortal( void );
  544.  
  545. // RAVEN BEGIN
  546. // abahr:
  547.     void                    Event_ReturnToPos1( void );
  548. // RAVEN END
  549. };
  550.  
  551. class idPlat : public idMover_Binary {
  552. public:
  553.     CLASS_PROTOTYPE( idPlat );
  554.  
  555.                             idPlat( void );
  556.                             ~idPlat( void );
  557.  
  558.     void                    Spawn( void );
  559.  
  560.     void                    Save( idSaveGame *savefile ) const;
  561.     void                    Restore( idRestoreGame *savefile );
  562.  
  563.     virtual void            Think( void );
  564.     virtual void            PreBind( void );
  565.     virtual void            PostBind( void );
  566.  
  567. private:
  568.     idClipModel *            trigger;
  569.     idVec3                    localTriggerOrigin;
  570.     idMat3                    localTriggerAxis;
  571.  
  572.     void                    GetLocalTriggerPosition( const idClipModel *trigger );
  573.     void                    SpawnPlatTrigger( idVec3 &pos );
  574.  
  575.     void                    Event_TeamBlocked( idEntity *blockedEntity, idEntity *blockingEntity );
  576.     void                    Event_PartBlocked( idEntity *blockingEntity );
  577.     void                    Event_Touch( idEntity *other, trace_t *trace );
  578. };
  579.  
  580.  
  581. /*
  582. ===============================================================================
  583.  
  584.   Special periodic movers.
  585.  
  586. ===============================================================================
  587. */
  588.  
  589. class idMover_Periodic : public idEntity {
  590. public:
  591.     CLASS_PROTOTYPE( idMover_Periodic );
  592.  
  593.                             idMover_Periodic( void );
  594.                             ~idMover_Periodic( void );
  595.  
  596.     void                    Spawn( void );
  597.     
  598.     void                    Save( idSaveGame *savefile ) const;
  599.     void                    Restore( idRestoreGame *savefile );
  600.  
  601.     virtual void            Think( void );
  602.  
  603.     virtual void            WriteToSnapshot( idBitMsgDelta &msg ) const;
  604.     virtual void            ReadFromSnapshot( const idBitMsgDelta &msg );
  605.  
  606. protected:
  607.     idPhysics_Parametric    physicsObj;
  608.     float                    damage;
  609.  
  610.     void                    Event_TeamBlocked( idEntity *blockedEntity, idEntity *blockingEntity );
  611.     void                    Event_PartBlocked( idEntity *blockingEntity );
  612. };
  613.  
  614. class idRotater : public idMover_Periodic {
  615. public:
  616.     CLASS_PROTOTYPE( idRotater );
  617.  
  618.                             idRotater( void );
  619.  
  620.     void                    Spawn( void );
  621.  
  622.     void                    Save( idSaveGame *savefile ) const;
  623.     void                    Restore( idRestoreGame *savefile );
  624.  
  625. private:
  626.     idEntityPtr<idEntity>    activatedBy;
  627.  
  628.     void                    Event_Activate( idEntity *activator );
  629. };
  630.  
  631. class idBobber : public idMover_Periodic {
  632. public:
  633.     CLASS_PROTOTYPE( idBobber );
  634.  
  635.                             idBobber( void );
  636.  
  637.     void                    Spawn( void );
  638.  
  639. private:
  640. };
  641.  
  642. class idPendulum : public idMover_Periodic {
  643. public:
  644.     CLASS_PROTOTYPE( idPendulum );
  645.  
  646.                             idPendulum( void );
  647.  
  648.     void                    Spawn( void );
  649.  
  650. private:
  651.  
  652. };
  653.  
  654. class idRiser : public idMover_Periodic {
  655. public:
  656.     CLASS_PROTOTYPE( idRiser );
  657.  
  658.     idRiser( void );
  659.  
  660.     void                    Spawn( void );
  661.  
  662. private:
  663.     void                    Event_Activate( idEntity *activator );
  664. };
  665.  
  666. // RAVEN BEGIN
  667. // bdube: conveyor belts
  668. class rvConveyor : public idEntity {
  669. public:
  670.     CLASS_PROTOTYPE( rvConveyor );
  671.  
  672.                             rvConveyor ( void );
  673.  
  674.     void                    Spawn( void );
  675.     void                    Think ( void );
  676.     
  677.     void                    Save( idSaveGame *savefile ) const;
  678.     void                    Restore( idRestoreGame *savefile );
  679. private:
  680.  
  681.     idVec3                    moveDir;
  682.     float                    moveSpeed;
  683.     
  684.     void                    Event_FindTargets     ( void );
  685. };
  686.  
  687. // nrausch: 
  688. class rvPusher : public idMover {
  689. public:
  690.     CLASS_PROTOTYPE( rvPusher );
  691.  
  692.     rvPusher( void );
  693.     ~rvPusher( void );
  694.  
  695.     virtual void Spawn( void );
  696.     virtual void Think ( void );
  697.  
  698. private:
  699.     jointHandle_t bindJointHandle;
  700.     idEntity *parent;
  701.     idVec3 pusherOrigin;
  702.     idMat3 pusherAxis;
  703. };
  704.  
  705. // RAVEN END
  706.  
  707. #endif /* !__GAME_MOVER_H__ */
  708.