Quake II RTX doxygen  1.0 dev
m_actor.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 // g_actor.c
19 
20 #include "g_local.h"
21 #include "m_actor.h"
22 
23 #define MAX_ACTOR_NAMES 8
25  "Hellrot",
26  "Tokay",
27  "Killme",
28  "Disruptor",
29  "Adrianator",
30  "Rambear",
31  "Titus",
32  "Bitterman"
33 };
34 
35 
37  { ai_stand, 0, NULL },
38  { ai_stand, 0, NULL },
39  { ai_stand, 0, NULL },
40  { ai_stand, 0, NULL },
41  { ai_stand, 0, NULL },
42  { ai_stand, 0, NULL },
43  { ai_stand, 0, NULL },
44  { ai_stand, 0, NULL },
45  { ai_stand, 0, NULL },
46  { ai_stand, 0, NULL },
47 
48  { ai_stand, 0, NULL },
49  { ai_stand, 0, NULL },
50  { ai_stand, 0, NULL },
51  { ai_stand, 0, NULL },
52  { ai_stand, 0, NULL },
53  { ai_stand, 0, NULL },
54  { ai_stand, 0, NULL },
55  { ai_stand, 0, NULL },
56  { ai_stand, 0, NULL },
57  { ai_stand, 0, NULL },
58 
59  { ai_stand, 0, NULL },
60  { ai_stand, 0, NULL },
61  { ai_stand, 0, NULL },
62  { ai_stand, 0, NULL },
63  { ai_stand, 0, NULL },
64  { ai_stand, 0, NULL },
65  { ai_stand, 0, NULL },
66  { ai_stand, 0, NULL },
67  { ai_stand, 0, NULL },
68  { ai_stand, 0, NULL },
69 
70  { ai_stand, 0, NULL },
71  { ai_stand, 0, NULL },
72  { ai_stand, 0, NULL },
73  { ai_stand, 0, NULL },
74  { ai_stand, 0, NULL },
75  { ai_stand, 0, NULL },
76  { ai_stand, 0, NULL },
77  { ai_stand, 0, NULL },
78  { ai_stand, 0, NULL },
79  { ai_stand, 0, NULL }
80 };
82 
83 void actor_stand(edict_t *self)
84 {
85  self->monsterinfo.currentmove = &actor_move_stand;
86 
87  // randomize on startup
88  if (level.time < 1.0)
89  self->s.frame = self->monsterinfo.currentmove->firstframe + (rand() % (self->monsterinfo.currentmove->lastframe - self->monsterinfo.currentmove->firstframe + 1));
90 }
91 
92 
94  { ai_walk, 0, NULL },
95  { ai_walk, 6, NULL },
96  { ai_walk, 10, NULL },
97  { ai_walk, 3, NULL },
98  { ai_walk, 2, NULL },
99  { ai_walk, 7, NULL },
100  { ai_walk, 10, NULL },
101  { ai_walk, 1, NULL },
102  { ai_walk, 4, NULL },
103  { ai_walk, 0, NULL },
104  { ai_walk, 0, NULL }
105 };
107 
108 void actor_walk(edict_t *self)
109 {
110  self->monsterinfo.currentmove = &actor_move_walk;
111 }
112 
113 
115  { ai_run, 4, NULL },
116  { ai_run, 15, NULL },
117  { ai_run, 15, NULL },
118  { ai_run, 8, NULL },
119  { ai_run, 20, NULL },
120  { ai_run, 15, NULL },
121  { ai_run, 8, NULL },
122  { ai_run, 17, NULL },
123  { ai_run, 12, NULL },
124  { ai_run, -2, NULL },
125  { ai_run, -2, NULL },
126  { ai_run, -1, NULL }
127 };
129 
130 void actor_run(edict_t *self)
131 {
132  if ((level.time < self->pain_debounce_time) && (!self->enemy)) {
133  if (self->movetarget)
134  actor_walk(self);
135  else
136  actor_stand(self);
137  return;
138  }
139 
140  if (self->monsterinfo.aiflags & AI_STAND_GROUND) {
141  actor_stand(self);
142  return;
143  }
144 
145  self->monsterinfo.currentmove = &actor_move_run;
146 }
147 
148 
150  { ai_move, -5, NULL },
151  { ai_move, 4, NULL },
152  { ai_move, 1, NULL }
153 };
155 
157  { ai_move, -4, NULL },
158  { ai_move, 4, NULL },
159  { ai_move, 0, NULL }
160 };
162 
164  { ai_move, -1, NULL },
165  { ai_move, 1, NULL },
166  { ai_move, 0, NULL }
167 };
169 
171  { ai_turn, 0, NULL },
172  { ai_turn, 0, NULL },
173  { ai_turn, 0, NULL },
174  { ai_turn, 0, NULL },
175  { ai_turn, 0, NULL },
176  { ai_turn, 0, NULL },
177  { ai_turn, 0, NULL },
178  { ai_turn, 0, NULL },
179  { ai_turn, 0, NULL },
180  { ai_turn, 0, NULL },
181  { ai_turn, 0, NULL },
182  { ai_turn, 0, NULL },
183  { ai_turn, 0, NULL },
184  { ai_turn, 0, NULL }
185 };
187 
189  { ai_turn, 0, NULL },
190  { ai_turn, 0, NULL },
191  { ai_turn, 0, NULL },
192  { ai_turn, 0, NULL },
193  { ai_turn, 0, NULL },
194  { ai_turn, 0, NULL },
195  { ai_turn, 0, NULL },
196  { ai_turn, 0, NULL },
197  { ai_turn, 0, NULL },
198  { ai_turn, 0, NULL },
199  { ai_turn, 0, NULL },
200  { ai_turn, 0, NULL },
201  { ai_turn, 0, NULL },
202  { ai_turn, 0, NULL },
203  { ai_turn, 0, NULL },
204  { ai_turn, 0, NULL },
205  { ai_turn, 0, NULL }
206 };
208 
209 char *messages[] = {
210  "Watch it",
211  "#$@*&",
212  "Idiot",
213  "Check your targets"
214 };
215 
216 void actor_pain(edict_t *self, edict_t *other, float kick, int damage)
217 {
218  int n;
219 
220  if (self->health < (self->max_health / 2))
221  self->s.skinnum = 1;
222 
223  if (level.time < self->pain_debounce_time)
224  return;
225 
226  self->pain_debounce_time = level.time + 3;
227 // gi.sound (self, CHAN_VOICE, actor.sound_pain, 1, ATTN_NORM, 0);
228 
229  if ((other->client) && (random() < 0.4)) {
230  vec3_t v;
231  char *name;
232 
233  VectorSubtract(other->s.origin, self->s.origin, v);
234  self->ideal_yaw = vectoyaw(v);
235  if (random() < 0.5)
236  self->monsterinfo.currentmove = &actor_move_flipoff;
237  else
238  self->monsterinfo.currentmove = &actor_move_taunt;
239  name = actor_names[(self - g_edicts) % MAX_ACTOR_NAMES];
240  gi.cprintf(other, PRINT_CHAT, "%s: %s!\n", name, messages[rand() % 3]);
241  return;
242  }
243 
244  n = rand() % 3;
245  if (n == 0)
246  self->monsterinfo.currentmove = &actor_move_pain1;
247  else if (n == 1)
248  self->monsterinfo.currentmove = &actor_move_pain2;
249  else
250  self->monsterinfo.currentmove = &actor_move_pain3;
251 }
252 
253 
254 void actorMachineGun(edict_t *self)
255 {
256  vec3_t start, target;
257  vec3_t forward, right;
258 
259  AngleVectors(self->s.angles, forward, right, NULL);
260  G_ProjectSource(self->s.origin, monster_flash_offset[MZ2_ACTOR_MACHINEGUN_1], forward, right, start);
261  if (self->enemy) {
262  if (self->enemy->health > 0) {
263  VectorMA(self->enemy->s.origin, -0.2, self->enemy->velocity, target);
264  target[2] += self->enemy->viewheight;
265  } else {
266  VectorCopy(self->enemy->absmin, target);
267  target[2] += (self->enemy->size[2] / 2);
268  }
269  VectorSubtract(target, start, forward);
271  } else {
272  AngleVectors(self->s.angles, forward, NULL, NULL);
273  }
274  monster_fire_bullet(self, start, forward, 3, 4, DEFAULT_BULLET_HSPREAD, DEFAULT_BULLET_VSPREAD, MZ2_ACTOR_MACHINEGUN_1);
275 }
276 
277 
278 void actor_dead(edict_t *self)
279 {
280  VectorSet(self->mins, -16, -16, -24);
281  VectorSet(self->maxs, 16, 16, -8);
282  self->movetype = MOVETYPE_TOSS;
283  self->svflags |= SVF_DEADMONSTER;
284  self->nextthink = 0;
285  gi.linkentity(self);
286 }
287 
289  { ai_move, 0, NULL },
290  { ai_move, 0, NULL },
291  { ai_move, -13, NULL },
292  { ai_move, 14, NULL },
293  { ai_move, 3, NULL },
294  { ai_move, -2, NULL },
295  { ai_move, 1, NULL }
296 };
298 
300  { ai_move, 0, NULL },
301  { ai_move, 7, NULL },
302  { ai_move, -6, NULL },
303  { ai_move, -5, NULL },
304  { ai_move, 1, NULL },
305  { ai_move, 0, NULL },
306  { ai_move, -1, NULL },
307  { ai_move, -2, NULL },
308  { ai_move, -1, NULL },
309  { ai_move, -9, NULL },
310  { ai_move, -13, NULL },
311  { ai_move, -13, NULL },
312  { ai_move, 0, NULL }
313 };
315 
316 void actor_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
317 {
318  int n;
319 
320 // check for gib
321  if (self->health <= -80) {
322 // gi.sound (self, CHAN_VOICE, actor.sound_gib, 1, ATTN_NORM, 0);
323  for (n = 0; n < 2; n++)
324  ThrowGib(self, "models/objects/gibs/bone/tris.md2", damage, GIB_ORGANIC);
325  for (n = 0; n < 4; n++)
326  ThrowGib(self, "models/objects/gibs/sm_meat/tris.md2", damage, GIB_ORGANIC);
327  ThrowHead(self, "models/objects/gibs/head2/tris.md2", damage, GIB_ORGANIC);
328  self->deadflag = DEAD_DEAD;
329  return;
330  }
331 
332  if (self->deadflag == DEAD_DEAD)
333  return;
334 
335 // regular death
336 // gi.sound (self, CHAN_VOICE, actor.sound_die, 1, ATTN_NORM, 0);
337  self->deadflag = DEAD_DEAD;
338  self->takedamage = DAMAGE_YES;
339 
340  n = rand() % 2;
341  if (n == 0)
342  self->monsterinfo.currentmove = &actor_move_death1;
343  else
344  self->monsterinfo.currentmove = &actor_move_death2;
345 }
346 
347 
348 void actor_fire(edict_t *self)
349 {
350  actorMachineGun(self);
351 
352  if (level.time >= self->monsterinfo.pausetime)
353  self->monsterinfo.aiflags &= ~AI_HOLD_FRAME;
354  else
355  self->monsterinfo.aiflags |= AI_HOLD_FRAME;
356 }
357 
359  { ai_charge, -2, actor_fire },
360  { ai_charge, -2, NULL },
361  { ai_charge, 3, NULL },
362  { ai_charge, 2, NULL }
363 };
365 
366 void actor_attack(edict_t *self)
367 {
368  int n;
369 
370  self->monsterinfo.currentmove = &actor_move_attack;
371  n = (rand() & 15) + 3 + 7;
372  self->monsterinfo.pausetime = level.time + n * FRAMETIME;
373 }
374 
375 
376 void actor_use(edict_t *self, edict_t *other, edict_t *activator)
377 {
378  vec3_t v;
379 
380  self->goalentity = self->movetarget = G_PickTarget(self->target);
381  if ((!self->movetarget) || (strcmp(self->movetarget->classname, "target_actor") != 0)) {
382  gi.dprintf("%s has bad target %s at %s\n", self->classname, self->target, vtos(self->s.origin));
383  self->target = NULL;
384  self->monsterinfo.pausetime = 100000000;
385  self->monsterinfo.stand(self);
386  return;
387  }
388 
389  VectorSubtract(self->goalentity->s.origin, self->s.origin, v);
390  self->ideal_yaw = self->s.angles[YAW] = vectoyaw(v);
391  self->monsterinfo.walk(self);
392  self->target = NULL;
393 }
394 
395 
396 /*QUAKED misc_actor (1 .5 0) (-16 -16 -24) (16 16 32)
397 */
398 
399 void SP_misc_actor(edict_t *self)
400 {
401  if (deathmatch->value) {
402  G_FreeEdict(self);
403  return;
404  }
405 
406  if (!self->targetname) {
407  gi.dprintf("untargeted %s at %s\n", self->classname, vtos(self->s.origin));
408  G_FreeEdict(self);
409  return;
410  }
411 
412  if (!self->target) {
413  gi.dprintf("%s with no target at %s\n", self->classname, vtos(self->s.origin));
414  G_FreeEdict(self);
415  return;
416  }
417 
418  self->movetype = MOVETYPE_STEP;
419  self->solid = SOLID_BBOX;
420  self->s.modelindex = gi.modelindex("players/male/tris.md2");
421  VectorSet(self->mins, -16, -16, -24);
422  VectorSet(self->maxs, 16, 16, 32);
423 
424  if (!self->health)
425  self->health = 100;
426  self->mass = 200;
427 
428  self->pain = actor_pain;
429  self->die = actor_die;
430 
431  self->monsterinfo.stand = actor_stand;
432  self->monsterinfo.walk = actor_walk;
433  self->monsterinfo.run = actor_run;
434  self->monsterinfo.attack = actor_attack;
435  self->monsterinfo.melee = NULL;
436  self->monsterinfo.sight = NULL;
437 
438  self->monsterinfo.aiflags |= AI_GOOD_GUY;
439 
440  gi.linkentity(self);
441 
442  self->monsterinfo.currentmove = &actor_move_stand;
443  self->monsterinfo.scale = MODEL_SCALE;
444 
445  walkmonster_start(self);
446 
447  // actors always start in a dormant state, they *must* be used to get going
448  self->use = actor_use;
449 }
450 
451 
452 /*QUAKED target_actor (.5 .3 0) (-8 -8 -8) (8 8 8) JUMP SHOOT ATTACK x HOLD BRUTAL
453 JUMP jump in set direction upon reaching this target
454 SHOOT take a single shot at the pathtarget
455 ATTACK attack pathtarget until it or actor is dead
456 
457 "target" next target_actor
458 "pathtarget" target of any action to be taken at this point
459 "wait" amount of time actor should pause at this point
460 "message" actor will "say" this to the player
461 
462 for JUMP only:
463 "speed" speed thrown forward (default 200)
464 "height" speed thrown upwards (default 200)
465 */
466 
467 void target_actor_touch(edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
468 {
469  vec3_t v;
470 
471  if (other->movetarget != self)
472  return;
473 
474  if (other->enemy)
475  return;
476 
477  other->goalentity = other->movetarget = NULL;
478 
479  if (self->message) {
480  int n;
481  edict_t *ent;
482 
483  for (n = 1; n <= game.maxclients; n++) {
484  ent = &g_edicts[n];
485  if (!ent->inuse)
486  continue;
487  gi.cprintf(ent, PRINT_CHAT, "%s: %s\n", actor_names[(other - g_edicts) % MAX_ACTOR_NAMES], self->message);
488  }
489  }
490 
491  if (self->spawnflags & 1) { //jump
492  other->velocity[0] = self->movedir[0] * self->speed;
493  other->velocity[1] = self->movedir[1] * self->speed;
494 
495  if (other->groundentity) {
496  other->groundentity = NULL;
497  other->velocity[2] = self->movedir[2];
498  gi.sound(other, CHAN_VOICE, gi.soundindex("player/male/jump1.wav"), 1, ATTN_NORM, 0);
499  }
500  }
501 
502  if (self->spawnflags & 2) { //shoot
503  } else if (self->spawnflags & 4) { //attack
504  other->enemy = G_PickTarget(self->pathtarget);
505  if (other->enemy) {
506  other->goalentity = other->enemy;
507  if (self->spawnflags & 32)
508  other->monsterinfo.aiflags |= AI_BRUTAL;
509  if (self->spawnflags & 16) {
510  other->monsterinfo.aiflags |= AI_STAND_GROUND;
512  } else {
513  actor_run(other);
514  }
515  }
516  }
517 
518  if (!(self->spawnflags & 6) && (self->pathtarget)) {
519  char *savetarget;
520 
521  savetarget = self->target;
522  self->target = self->pathtarget;
523  G_UseTargets(self, other);
524  self->target = savetarget;
525  }
526 
527  other->movetarget = G_PickTarget(self->target);
528 
529  if (!other->goalentity)
530  other->goalentity = other->movetarget;
531 
532  if (!other->movetarget && !other->enemy) {
533  other->monsterinfo.pausetime = level.time + 100000000;
534  other->monsterinfo.stand(other);
535  } else if (other->movetarget == other->goalentity) {
536  VectorSubtract(other->movetarget->s.origin, other->s.origin, v);
537  other->ideal_yaw = vectoyaw(v);
538  }
539 }
540 
541 void SP_target_actor(edict_t *self)
542 {
543  if (!self->targetname)
544  gi.dprintf("%s with no targetname at %s\n", self->classname, vtos(self->s.origin));
545 
546  self->solid = SOLID_TRIGGER;
547  self->touch = target_actor_touch;
548  VectorSet(self->mins, -8, -8, -8);
549  VectorSet(self->maxs, 8, 8, 8);
550  self->svflags = SVF_NOCLIENT;
551 
552  if (self->spawnflags & 1) {
553  if (!self->speed)
554  self->speed = 200;
555  if (!st.height)
556  st.height = 200;
557  if (self->s.angles[YAW] == 0)
558  self->s.angles[YAW] = 360;
559  G_SetMovedir(self->s.angles, self->movedir);
560  self->movedir[2] = st.height;
561  }
562 
563  gi.linkentity(self);
564 }
gi
game_import_t gi
Definition: g_main.c:23
FRAME_taunt01
#define FRAME_taunt01
Definition: m_actor.h:256
FRAME_death201
#define FRAME_death201
Definition: m_actor.h:33
deathmatch
cvar_t * deathmatch
Definition: g_main.c:33
G_ProjectSource
void G_ProjectSource(const vec3_t point, const vec3_t distance, const vec3_t forward, const vec3_t right, vec3_t result)
Definition: g_utils.c:23
DEAD_DEAD
#define DEAD_DEAD
Definition: g_local.h:112
FRAME_pain301
#define FRAME_pain301
Definition: m_actor.h:102
AI_BRUTAL
#define AI_BRUTAL
Definition: g_local.h:135
FRAME_attak04
#define FRAME_attak04
Definition: m_actor.h:25
DEFAULT_BULLET_HSPREAD
#define DEFAULT_BULLET_HSPREAD
Definition: g_local.h:654
ThrowGib
void ThrowGib(edict_t *self, char *gibname, int damage, int type)
Definition: g_misc.c:130
ai_charge
void ai_charge(edict_t *self, float dist)
Definition: g_ai.c:175
AI_GOOD_GUY
#define AI_GOOD_GUY
Definition: g_local.h:134
actor_pain
void actor_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: m_actor.c:216
actor_frames_pain1
mframe_t actor_frames_pain1[]
Definition: m_actor.c:149
FRAME_stand101
#define FRAME_stand101
Definition: m_actor.h:150
FRAMETIME
#define FRAMETIME
Definition: g_local.h:75
messages
char * messages[]
Definition: m_actor.c:209
st
spawn_temp_t st
Definition: g_main.c:25
actor_run
void actor_run(edict_t *self)
Definition: m_actor.c:130
actor_move_pain3
mmove_t actor_move_pain3
Definition: m_actor.c:168
m_actor.h
actor_walk
void actor_walk(edict_t *self)
Definition: m_actor.c:108
actor_move_flipoff
mmove_t actor_move_flipoff
Definition: m_actor.c:186
mmove_t::frame
mframe_t * frame
Definition: g_local.h:403
actor_move_death2
mmove_t actor_move_death2
Definition: m_actor.c:314
FRAME_death101
#define FRAME_death101
Definition: m_actor.h:26
AI_STAND_GROUND
#define AI_STAND_GROUND
Definition: g_local.h:126
actor_move_attack
mmove_t actor_move_attack
Definition: m_actor.c:364
MODEL_SCALE
#define MODEL_SCALE
Definition: m_actor.h:504
DAMAGE_YES
@ DAMAGE_YES
Definition: g_local.h:88
actor_move_run
mmove_t actor_move_run
Definition: m_actor.c:128
actor_attack
void actor_attack(edict_t *self)
Definition: m_actor.c:366
vectoyaw
float vectoyaw(vec3_t vec)
Definition: g_utils.c:310
actor_fire
void actor_fire(edict_t *self)
Definition: m_actor.c:348
actor_frames_taunt
mframe_t actor_frames_taunt[]
Definition: m_actor.c:188
g_edicts
edict_t * g_edicts
Definition: g_main.c:31
other
@ other
Definition: ogg.c:63
FRAME_run02
#define FRAME_run02
Definition: m_actor.h:115
actor_move_pain2
mmove_t actor_move_pain2
Definition: m_actor.c:161
FRAME_pain101
#define FRAME_pain101
Definition: m_actor.h:96
ai_turn
void ai_turn(edict_t *self, float dist)
Definition: g_ai.c:196
walkmonster_start
void walkmonster_start(edict_t *self)
Definition: g_monster.c:630
MOVETYPE_STEP
@ MOVETYPE_STEP
Definition: g_local.h:192
actor_names
char * actor_names[MAX_ACTOR_NAMES]
Definition: m_actor.c:24
SP_target_actor
void SP_target_actor(edict_t *self)
Definition: m_actor.c:541
DEFAULT_BULLET_VSPREAD
#define DEFAULT_BULLET_VSPREAD
Definition: g_local.h:655
actor_frames_death1
mframe_t actor_frames_death1[]
Definition: m_actor.c:288
spawn_temp_t::height
int height
Definition: g_local.h:351
G_FreeEdict
void G_FreeEdict(edict_t *e)
Definition: g_utils.c:421
actor_move_stand
mmove_t actor_move_stand
Definition: m_actor.c:81
actor_frames_flipoff
mframe_t actor_frames_flipoff[]
Definition: m_actor.c:170
actor_frames_stand
mframe_t actor_frames_stand[]
Definition: m_actor.c:36
FRAME_death213
#define FRAME_death213
Definition: m_actor.h:45
FRAME_attak01
#define FRAME_attak01
Definition: m_actor.h:22
forward
static vec3_t forward
Definition: p_view.c:27
actor_move_walk
mmove_t actor_move_walk
Definition: m_actor.c:106
AI_HOLD_FRAME
#define AI_HOLD_FRAME
Definition: g_local.h:133
actor_move_pain1
mmove_t actor_move_pain1
Definition: m_actor.c:154
actorMachineGun
void actorMachineGun(edict_t *self)
Definition: m_actor.c:254
actor_die
void actor_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: m_actor.c:316
mframe_t
Definition: g_local.h:394
mmove_t
Definition: g_local.h:400
vtos
char * vtos(vec3_t v)
Definition: g_utils.c:275
game
game_locals_t game
Definition: g_main.c:21
ai_walk
void ai_walk(edict_t *self, float dist)
Definition: g_ai.c:148
actor_frames_attack
mframe_t actor_frames_attack[]
Definition: m_actor.c:358
random
#define random()
Definition: g_local.h:504
AngleVectors
void AngleVectors(vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
Definition: shared.c:23
actor_dead
void actor_dead(edict_t *self)
Definition: m_actor.c:278
SP_misc_actor
void SP_misc_actor(edict_t *self)
Definition: m_actor.c:399
FRAME_walk08
#define FRAME_walk08
Definition: m_actor.h:280
actor_use
void actor_use(edict_t *self, edict_t *other, edict_t *activator)
Definition: m_actor.c:376
actor_move_death1
mmove_t actor_move_death1
Definition: m_actor.c:297
monster_fire_bullet
void monster_fire_bullet(edict_t *self, vec3_t start, vec3_t dir, int damage, int kick, int hspread, int vspread, int flashtype)
Definition: g_monster.c:29
ai_move
void ai_move(edict_t *self, float dist)
Definition: g_ai.c:86
level_locals_t::time
float time
Definition: g_local.h:299
FRAME_flip01
#define FRAME_flip01
Definition: m_actor.h:61
FRAME_death107
#define FRAME_death107
Definition: m_actor.h:32
FRAME_pain103
#define FRAME_pain103
Definition: m_actor.h:98
actor_frames_pain3
mframe_t actor_frames_pain3[]
Definition: m_actor.c:163
MAX_ACTOR_NAMES
#define MAX_ACTOR_NAMES
Definition: m_actor.c:23
right
static vec3_t right
Definition: p_view.c:27
ai_run
void ai_run(edict_t *self, float dist)
Definition: g_ai.c:821
G_UseTargets
void G_UseTargets(edict_t *ent, edict_t *activator)
Definition: g_utils.c:166
FRAME_walk01
#define FRAME_walk01
Definition: m_actor.h:273
GIB_ORGANIC
#define GIB_ORGANIC
Definition: g_local.h:122
actor_frames_pain2
mframe_t actor_frames_pain2[]
Definition: m_actor.c:156
FRAME_pain203
#define FRAME_pain203
Definition: m_actor.h:101
level
level_locals_t level
Definition: g_main.c:22
FRAME_pain303
#define FRAME_pain303
Definition: m_actor.h:104
monster_flash_offset
const vec3_t monster_flash_offset[256]
Definition: m_flash.c:25
G_SetMovedir
void G_SetMovedir(vec3_t angles, vec3_t movedir)
Definition: g_utils.c:296
ThrowHead
void ThrowHead(edict_t *self, char *gibname, int damage, int type)
Definition: g_misc.c:175
FRAME_pain201
#define FRAME_pain201
Definition: m_actor.h:99
actor_frames_run
mframe_t actor_frames_run[]
Definition: m_actor.c:114
FRAME_run07
#define FRAME_run07
Definition: m_actor.h:120
actor_frames_death2
mframe_t actor_frames_death2[]
Definition: m_actor.c:299
FRAME_flip14
#define FRAME_flip14
Definition: m_actor.h:74
FRAME_stand140
#define FRAME_stand140
Definition: m_actor.h:189
MOVETYPE_TOSS
@ MOVETYPE_TOSS
Definition: g_local.h:194
FRAME_taunt17
#define FRAME_taunt17
Definition: m_actor.h:272
actor_move_taunt
mmove_t actor_move_taunt
Definition: m_actor.c:207
G_PickTarget
edict_t * G_PickTarget(char *targetname)
Definition: g_utils.c:114
actor_stand
void actor_stand(edict_t *self)
Definition: m_actor.c:83
actor_frames_walk
mframe_t actor_frames_walk[]
Definition: m_actor.c:93
VectorNormalize
vec_t VectorNormalize(vec3_t v)
Definition: shared.c:55
target_actor_touch
void target_actor_touch(edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
Definition: m_actor.c:467
ai_stand
void ai_stand(edict_t *self, float dist)
Definition: g_ai.c:100
g_local.h
game_locals_t::maxclients
int maxclients
Definition: g_local.h:280