supergun.hh 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /********************************************************************** <BR>
  2. This file is part of Crack dot Com's free source code release of
  3. Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for
  4. information about compiling & licensing issues visit this URL</a>
  5. <PRE> If that doesn't help, contact Jonathan Clark at
  6. golgotha_source@usa.net (Subject should have "GOLG" in it)
  7. ***********************************************************************/
  8. #ifndef G1_SUPERGUN_HH
  9. #define G1_SUPERGUN_HH
  10. #include "sound/sound.hh"
  11. #include "objs/map_piece.hh"
  12. class g1_supergun_class : public g1_map_piece_class
  13. {
  14. protected:
  15. g1_mini_object *muzzle;
  16. i4_float target_angle, target_pitch;
  17. i4_float target_groundspeed, target_zspeed;
  18. int time;
  19. int mode;
  20. public:
  21. g1_supergun_class(g1_object_type id, g1_loader_class *fp);
  22. virtual void save(g1_saver_class *fp);
  23. enum { ORIGNAL_RUMBLE_VOLUME=I4_SOUND_VOLUME_LEVELS/8 };
  24. virtual i4_bool suggest_new_attack_target(g1_object_class *new_target, g1_fire_range_type range);
  25. virtual g1_fire_range_type range() { return G1_FIRE_RANGE_1; }
  26. virtual void fire();
  27. virtual void think();
  28. virtual void setup(i4_float x, i4_float y, g1_object_class *creator);
  29. virtual i4_bool deploy_to(float x, float y);
  30. virtual i4_bool occupy_location()
  31. {
  32. int ret;
  33. if (ret = g1_object_class::occupy_location_model(draw_params))
  34. get_terrain_info();
  35. return ret;
  36. }
  37. };
  38. #endif