weevil.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. class idWeevil : public idMoveableItem
  2. {
  3. public:
  4. CLASS_PROTOTYPE( idWeevil );
  5. void Save( idSaveGame *savefile ) const;
  6. void Restore( idRestoreGame *savefile );
  7. void Spawn( void );
  8. virtual void Think( void );
  9. virtual void Present( void );
  10. void OnGet( void );
  11. bool isJumping( void );
  12. private:
  13. bool isGravity;
  14. enum { IDLE, WALKING, TURNING, JUMPSTART, JUMPING };
  15. int state;
  16. int walkDirection;
  17. int turnCurrent;
  18. int turnTarget;
  19. int turnDirection;
  20. int offroadTimer;
  21. int jumpstartTimer;
  22. idVec3 lastPosition;
  23. void Event_doPlug( int active, idEntity * plugEnt );
  24. void Event_PlayAnim( const char* animname, bool cycle );
  25. void Event_stop( void );
  26. void Event_forward( int distance );
  27. void Event_turn( int degrees );
  28. void Event_stand( void );
  29. void Event_jump( void );
  30. void Event_light( int value );
  31. void Event_gravity( int value );
  32. void Event_getgravity( );
  33. void Event_plugdone(idVec3 const &position );
  34. void Event_isweevilplugconnected( void );
  35. void UpdateStates( void );
  36. bool CanMove( void );
  37. bool HasObstacle( void );
  38. idAnimatedEntity * model;
  39. idEntity * nosecam;
  40. idLight * light;
  41. idMover * plugModel;
  42. idBeam* beamStart;
  43. idBeam* beamEnd;
  44. void Event_weevilEyeMove(float pitch, float yaw, bool reset);
  45. jointHandle_t headJoint;
  46. idAngles headAngle;
  47. };