cobra_tank.cc 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. #include "object_definer.hh"
  9. #include "lisp/li_class.hh"
  10. #include "objs/model_draw.hh"
  11. class g1_cobra_tank_class : public g1_object_class
  12. {
  13. public:
  14. virtual i4_float occupancy_radius() const { return draw_params.extent(); }
  15. g1_cobra_tank_class(g1_object_type id, g1_loader_class *fp)
  16. : g1_object_class(id,fp)
  17. {
  18. radar_type=G1_RADAR_VEHICLE;
  19. flags=SHADOWED |
  20. SELECTABLE |
  21. TARGETABLE |
  22. GROUND |
  23. HIT_GROUND |
  24. BLOCKING |
  25. DANGEROUS;
  26. draw_params.setup("cobra");
  27. }
  28. void think()
  29. {
  30. grab_old();
  31. unoccupy_location();
  32. x += 0.01;
  33. if (occupy_location())
  34. request_think();
  35. }
  36. };
  37. static g1_object_definer<g1_cobra_tank_class>
  38. damager_type("cobra_tank", g1_object_definition_class::EDITOR_SELECTABLE |
  39. g1_object_definition_class::MOVABLE);