icculus quake2 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
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 {
35  gi.WritePosition (ent->s.origin);
37  G_FreeEdict (ent);
38 }
39 
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 */
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 }
FRAME_stand260
#define FRAME_stand260
Definition: m_boss32.h:497
gi
game_import_t gi
Definition: g_main.c:25
SP_monster_boss3_stand
void SP_monster_boss3_stand(edict_t *self)
Definition: m_boss3.c:53
edict_s::s
entity_state_t s
Definition: g_local.h:964
deathmatch
cvar_t * deathmatch
Definition: g_main.c:35
edict_s::activator
edict_t * activator
Definition: g_local.h:1072
entity_state_s::frame
int frame
Definition: q_shared.h:1178
game_import_t::WritePosition
void(* WritePosition)(vec3_t pos)
Definition: game.h:152
game_import_t::multicast
void(* multicast)(vec3_t origin, multicast_t to)
Definition: game.h:144
SOLID_BBOX
@ SOLID_BBOX
Definition: game.h:37
FRAMETIME
#define FRAMETIME
Definition: g_local.h:73
entity_state_s::origin
vec3_t origin
Definition: q_shared.h:1173
FRAME_stand201
#define FRAME_stand201
Definition: m_actor.h:192
MOVETYPE_STEP
@ MOVETYPE_STEP
Definition: g_local.h:194
edict_s
Definition: g_local.h:962
m_boss32.h
G_FreeEdict
void G_FreeEdict(edict_t *e)
Definition: g_utils.c:452
Use_Boss3
void Use_Boss3(edict_t *ent, edict_t *other, edict_t *activator)
Definition: m_boss3.c:31
game_import_t::soundindex
int(* soundindex)(char *name)
Definition: game.h:122
game_import_t::modelindex
int(* modelindex)(char *name)
Definition: game.h:121
edict_s::nextthink
float nextthink
Definition: g_local.h:1036
cvar_s::value
float value
Definition: q_shared.h:324
svc_temp_entity
@ svc_temp_entity
Definition: qcommon.h:210
TE_BOSSTPORT
@ TE_BOSSTPORT
Definition: q_shared.h:957
game_import_t::WriteByte
void(* WriteByte)(int c)
Definition: game.h:147
level
GLint level
Definition: qgl_win.c:116
VectorSet
#define VectorSet(v, x, y, z)
Definition: q_shared.h:161
Think_Boss3Stand
void Think_Boss3Stand(edict_t *ent)
Definition: m_boss3.c:40
game_import_t::linkentity
void(* linkentity)(edict_t *ent)
Definition: game.h:138
MULTICAST_PVS
@ MULTICAST_PVS
Definition: q_shared.h:111
g_local.h