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