Quake II RTX doxygen  1.0 dev
m_boss3.c
Go to the documentation of this file.
1 /*
2 Copyright (C) 1997-2001 Id Software, Inc.
3 
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (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. See the
12 GNU General Public License for more details.
13 
14 You should have received a copy of the GNU General Public License along
15 with this program; if not, write to the Free Software Foundation, Inc.,
16 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
18 /*
19 ==============================================================================
20 
21 boss3
22 
23 ==============================================================================
24 */
25 
26 #include "g_local.h"
27 #include "m_boss32.h"
28 
29 void Use_Boss3(edict_t *ent, edict_t *other, edict_t *activator)
30 {
31  gi.WriteByte(svc_temp_entity);
32  gi.WriteByte(TE_BOSSTPORT);
33  gi.WritePosition(ent->s.origin);
34  gi.multicast(ent->s.origin, MULTICAST_PVS);
35  G_FreeEdict(ent);
36 }
37 
38 void Think_Boss3Stand(edict_t *ent)
39 {
40  if (ent->s.frame == FRAME_stand260)
41  ent->s.frame = FRAME_stand201;
42  else
43  ent->s.frame++;
44  ent->nextthink = level.time + FRAMETIME;
45 }
46 
47 /*QUAKED monster_boss3_stand (1 .5 0) (-32 -32 0) (32 32 90)
48 
49 Just stands and cycles in one place until targeted, then teleports away.
50 */
51 void SP_monster_boss3_stand(edict_t *self)
52 {
53  if (deathmatch->value) {
54  G_FreeEdict(self);
55  return;
56  }
57 
58  self->movetype = MOVETYPE_STEP;
59  self->solid = SOLID_BBOX;
60  self->model = "models/monsters/boss3/rider/tris.md2";
61  self->s.modelindex = gi.modelindex(self->model);
62  self->s.frame = FRAME_stand201;
63 
64  gi.soundindex("misc/bigtele.wav");
65 
66  VectorSet(self->mins, -32, -32, 0);
67  VectorSet(self->maxs, 32, 32, 90);
68 
69  self->use = Use_Boss3;
70  self->think = Think_Boss3Stand;
71  self->nextthink = level.time + FRAMETIME;
72  gi.linkentity(self);
73 }
FRAME_stand260
#define FRAME_stand260
Definition: m_boss32.h:495
gi
game_import_t gi
Definition: g_main.c:23
SP_monster_boss3_stand
void SP_monster_boss3_stand(edict_t *self)
Definition: m_boss3.c:51
deathmatch
cvar_t * deathmatch
Definition: g_main.c:33
FRAMETIME
#define FRAMETIME
Definition: g_local.h:75
FRAME_stand201
#define FRAME_stand201
Definition: m_actor.h:190
other
@ other
Definition: ogg.c:63
MOVETYPE_STEP
@ MOVETYPE_STEP
Definition: g_local.h:192
m_boss32.h
G_FreeEdict
void G_FreeEdict(edict_t *e)
Definition: g_utils.c:421
Use_Boss3
void Use_Boss3(edict_t *ent, edict_t *other, edict_t *activator)
Definition: m_boss3.c:29
svc_temp_entity
#define svc_temp_entity
Definition: g_local.h:38
level_locals_t::time
float time
Definition: g_local.h:299
level
level_locals_t level
Definition: g_main.c:22
Think_Boss3Stand
void Think_Boss3Stand(edict_t *ent)
Definition: m_boss3.c:38
g_local.h