turret.h 970 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. class idTurret : public idAnimatedEntity
  2. {
  3. public:
  4. CLASS_PROTOTYPE( idTurret );
  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. private:
  11. void UpdateStates( void );
  12. enum { OFF, ON, CLOSING };
  13. int state;
  14. enum { IDLE, WARMUP, VOLLEYING };
  15. int attackState;
  16. int nextStateTime;
  17. int volleyCount;
  18. int nextIdleSound;
  19. void Event_activate( int value );
  20. void Event_isactive();
  21. void MuzzleflashOff();
  22. idMat3 bodyAxis;
  23. idMat3 turretAxis;
  24. idBeam* beamStart;
  25. idBeam* beamEnd;
  26. idEntity* laserdot;
  27. idEntityPtr<idEntity> targetEnt; // entity being dragged
  28. bool CheckTargetLOS(idEntity *ent, idVec3 offset);
  29. bool CheckTargetValidity(idEntity *ent);
  30. void GotoWarmupState( void );
  31. };