m_boss3.c 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /*
  2. Copyright (C) 1997-2001 Id Software, Inc.
  3. This program is free software; you can redistribute it and/or
  4. modify it under the terms of the GNU General Public License
  5. as published by the Free Software Foundation; either version 2
  6. of the License, or (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. See the GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program; if not, write to the Free Software
  13. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  14. */
  15. /*
  16. ==============================================================================
  17. boss3
  18. ==============================================================================
  19. */
  20. #include "g_local.h"
  21. #include "m_boss32.h"
  22. void Use_Boss3 (edict_t *ent, edict_t *other, edict_t *activator)
  23. {
  24. gi.WriteByte (svc_temp_entity);
  25. gi.WriteByte (TE_BOSSTPORT);
  26. gi.WritePosition (ent->s.origin);
  27. gi.multicast (ent->s.origin, MULTICAST_PVS);
  28. G_FreeEdict (ent);
  29. }
  30. void Think_Boss3Stand (edict_t *ent)
  31. {
  32. if (ent->s.frame == FRAME_stand260)
  33. ent->s.frame = FRAME_stand201;
  34. else
  35. ent->s.frame++;
  36. ent->nextthink = level.time + FRAMETIME;
  37. }
  38. /*QUAKED monster_boss3_stand (1 .5 0) (-32 -32 0) (32 32 90)
  39. Just stands and cycles in one place until targeted, then teleports away.
  40. */
  41. void SP_monster_boss3_stand (edict_t *self)
  42. {
  43. if (deathmatch->value)
  44. {
  45. G_FreeEdict (self);
  46. return;
  47. }
  48. self->movetype = MOVETYPE_STEP;
  49. self->solid = SOLID_BBOX;
  50. self->model = "models/monsters/boss3/rider/tris.md2";
  51. self->s.modelindex = gi.modelindex (self->model);
  52. self->s.frame = FRAME_stand201;
  53. gi.soundindex ("misc/bigtele.wav");
  54. VectorSet (self->mins, -32, -32, 0);
  55. VectorSet (self->maxs, 32, 32, 90);
  56. self->use = Use_Boss3;
  57. self->think = Think_Boss3Stand;
  58. self->nextthink = level.time + FRAMETIME;
  59. gi.linkentity (self);
  60. }