Quake II RTX doxygen  1.0 dev
m_gunner.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 GUNNER
22 
23 ==============================================================================
24 */
25 
26 #include "g_local.h"
27 #include "m_gunner.h"
28 
29 
30 static int sound_pain;
31 static int sound_pain2;
32 static int sound_death;
33 static int sound_idle;
34 static int sound_open;
35 static int sound_search;
36 static int sound_sight;
37 
38 
39 void gunner_idlesound(edict_t *self)
40 {
41  gi.sound(self, CHAN_VOICE, sound_idle, 1, ATTN_IDLE, 0);
42 }
43 
44 void gunner_sight(edict_t *self, edict_t *other)
45 {
46  gi.sound(self, CHAN_VOICE, sound_sight, 1, ATTN_NORM, 0);
47 }
48 
49 void gunner_search(edict_t *self)
50 {
51  gi.sound(self, CHAN_VOICE, sound_search, 1, ATTN_NORM, 0);
52 }
53 
54 
55 qboolean visible(edict_t *self, edict_t *other);
56 void GunnerGrenade(edict_t *self);
57 void GunnerFire(edict_t *self);
58 void gunner_fire_chain(edict_t *self);
59 void gunner_refire_chain(edict_t *self);
60 
61 
62 void gunner_stand(edict_t *self);
63 
65  { ai_stand, 0, NULL },
66  { ai_stand, 0, NULL },
67  { ai_stand, 0, NULL },
68  { ai_stand, 0, NULL },
69  { ai_stand, 0, NULL },
70  { ai_stand, 0, NULL },
71  { ai_stand, 0, NULL },
72  { ai_stand, 0, gunner_idlesound },
73  { ai_stand, 0, NULL },
74 
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  { ai_stand, 0, NULL },
81  { ai_stand, 0, NULL },
82  { ai_stand, 0, NULL },
83  { ai_stand, 0, NULL },
84  { ai_stand, 0, NULL },
85 
86  { ai_stand, 0, NULL },
87  { ai_stand, 0, NULL },
88  { ai_stand, 0, NULL },
89  { ai_stand, 0, NULL },
90  { ai_stand, 0, NULL },
91  { ai_stand, 0, NULL },
92  { ai_stand, 0, NULL },
93  { ai_stand, 0, NULL },
94  { ai_stand, 0, NULL },
95  { ai_stand, 0, NULL },
96 
97  { ai_stand, 0, NULL },
98  { ai_stand, 0, NULL },
99  { ai_stand, 0, NULL },
100  { ai_stand, 0, NULL },
101  { ai_stand, 0, NULL },
102  { ai_stand, 0, NULL },
103  { ai_stand, 0, NULL },
104  { ai_stand, 0, NULL },
105  { ai_stand, 0, NULL },
106  { ai_stand, 0, NULL },
107 
108  { ai_stand, 0, NULL },
109  { ai_stand, 0, NULL },
110  { ai_stand, 0, NULL },
111  { ai_stand, 0, NULL },
112  { ai_stand, 0, NULL },
113  { ai_stand, 0, NULL },
114  { ai_stand, 0, NULL },
115  { ai_stand, 0, NULL },
116  { ai_stand, 0, NULL },
117  { ai_stand, 0, NULL }
118 };
120 
121 void gunner_fidget(edict_t *self)
122 {
123  if (self->monsterinfo.aiflags & AI_STAND_GROUND)
124  return;
125  if (random() <= 0.05)
126  self->monsterinfo.currentmove = &gunner_move_fidget;
127 }
128 
130  { ai_stand, 0, NULL },
131  { ai_stand, 0, NULL },
132  { ai_stand, 0, NULL },
133  { ai_stand, 0, NULL },
134  { ai_stand, 0, NULL },
135  { ai_stand, 0, NULL },
136  { ai_stand, 0, NULL },
137  { ai_stand, 0, NULL },
138  { ai_stand, 0, NULL },
139  { ai_stand, 0, gunner_fidget },
140 
141  { ai_stand, 0, NULL },
142  { ai_stand, 0, NULL },
143  { ai_stand, 0, NULL },
144  { ai_stand, 0, NULL },
145  { ai_stand, 0, NULL },
146  { ai_stand, 0, NULL },
147  { ai_stand, 0, NULL },
148  { ai_stand, 0, NULL },
149  { ai_stand, 0, NULL },
150  { ai_stand, 0, gunner_fidget },
151 
152  { ai_stand, 0, NULL },
153  { ai_stand, 0, NULL },
154  { ai_stand, 0, NULL },
155  { ai_stand, 0, NULL },
156  { ai_stand, 0, NULL },
157  { ai_stand, 0, NULL },
158  { ai_stand, 0, NULL },
159  { ai_stand, 0, NULL },
160  { ai_stand, 0, NULL },
161  { ai_stand, 0, gunner_fidget }
162 };
164 
165 void gunner_stand(edict_t *self)
166 {
167  self->monsterinfo.currentmove = &gunner_move_stand;
168 }
169 
170 
172  { ai_walk, 0, NULL },
173  { ai_walk, 3, NULL },
174  { ai_walk, 4, NULL },
175  { ai_walk, 5, NULL },
176  { ai_walk, 7, NULL },
177  { ai_walk, 2, NULL },
178  { ai_walk, 6, NULL },
179  { ai_walk, 4, NULL },
180  { ai_walk, 2, NULL },
181  { ai_walk, 7, NULL },
182  { ai_walk, 5, NULL },
183  { ai_walk, 7, NULL },
184  { ai_walk, 4, NULL }
185 };
187 
188 void gunner_walk(edict_t *self)
189 {
190  self->monsterinfo.currentmove = &gunner_move_walk;
191 }
192 
194  { ai_run, 26, NULL },
195  { ai_run, 9, NULL },
196  { ai_run, 9, NULL },
197  { ai_run, 9, NULL },
198  { ai_run, 15, NULL },
199  { ai_run, 10, NULL },
200  { ai_run, 13, NULL },
201  { ai_run, 6, NULL }
202 };
203 
205 
206 void gunner_run(edict_t *self)
207 {
208  if (self->monsterinfo.aiflags & AI_STAND_GROUND)
209  self->monsterinfo.currentmove = &gunner_move_stand;
210  else
211  self->monsterinfo.currentmove = &gunner_move_run;
212 }
213 
215  { ai_run, 32, NULL },
216  { ai_run, 15, NULL },
217  { ai_run, 10, NULL },
218  { ai_run, 18, NULL },
219  { ai_run, 8, NULL },
220  { ai_run, 20, NULL }
221 };
222 
224 
225 void gunner_runandshoot(edict_t *self)
226 {
227  self->monsterinfo.currentmove = &gunner_move_runandshoot;
228 }
229 
231  { ai_move, -3, NULL },
232  { ai_move, 1, NULL },
233  { ai_move, 1, NULL },
234  { ai_move, 0, NULL },
235  { ai_move, 1, NULL }
236 };
238 
240  { ai_move, -2, NULL },
241  { ai_move, 11, NULL },
242  { ai_move, 6, NULL },
243  { ai_move, 2, NULL },
244  { ai_move, -1, NULL },
245  { ai_move, -7, NULL },
246  { ai_move, -2, NULL },
247  { ai_move, -7, NULL }
248 };
250 
252  { ai_move, 2, NULL },
253  { ai_move, 0, NULL },
254  { ai_move, -5, NULL },
255  { ai_move, 3, NULL },
256  { ai_move, -1, NULL },
257  { ai_move, 0, NULL },
258  { ai_move, 0, NULL },
259  { ai_move, 0, NULL },
260  { ai_move, 0, NULL },
261  { ai_move, 1, NULL },
262  { ai_move, 1, NULL },
263  { ai_move, 2, NULL },
264  { ai_move, 1, NULL },
265  { ai_move, 0, NULL },
266  { ai_move, -2, NULL },
267  { ai_move, -2, NULL },
268  { ai_move, 0, NULL },
269  { ai_move, 0, NULL }
270 };
272 
273 void gunner_pain(edict_t *self, edict_t *other, float kick, int damage)
274 {
275  if (self->health < (self->max_health / 2))
276  self->s.skinnum = 1;
277 
278  if (level.time < self->pain_debounce_time)
279  return;
280 
281  self->pain_debounce_time = level.time + 3;
282 
283  if (rand() & 1)
284  gi.sound(self, CHAN_VOICE, sound_pain, 1, ATTN_NORM, 0);
285  else
286  gi.sound(self, CHAN_VOICE, sound_pain2, 1, ATTN_NORM, 0);
287 
288  if (skill->value == 3)
289  return; // no pain anims in nightmare
290 
291  if (damage <= 10)
292  self->monsterinfo.currentmove = &gunner_move_pain3;
293  else if (damage <= 25)
294  self->monsterinfo.currentmove = &gunner_move_pain2;
295  else
296  self->monsterinfo.currentmove = &gunner_move_pain1;
297 }
298 
299 void gunner_dead(edict_t *self)
300 {
301  VectorSet(self->mins, -16, -16, -24);
302  VectorSet(self->maxs, 16, 16, -8);
303  self->movetype = MOVETYPE_TOSS;
304  self->svflags |= SVF_DEADMONSTER;
305  self->nextthink = 0;
306  gi.linkentity(self);
307 }
308 
310  { ai_move, 0, NULL },
311  { ai_move, 0, NULL },
312  { ai_move, 0, NULL },
313  { ai_move, -7, NULL },
314  { ai_move, -3, NULL },
315  { ai_move, -5, NULL },
316  { ai_move, 8, NULL },
317  { ai_move, 6, NULL },
318  { ai_move, 0, NULL },
319  { ai_move, 0, NULL },
320  { ai_move, 0, NULL }
321 };
323 
324 void gunner_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
325 {
326  int n;
327 
328 // check for gib
329  if (self->health <= self->gib_health) {
330  gi.sound(self, CHAN_VOICE, gi.soundindex("misc/udeath.wav"), 1, ATTN_NORM, 0);
331  for (n = 0; n < 2; n++)
332  ThrowGib(self, "models/objects/gibs/bone/tris.md2", damage, GIB_ORGANIC);
333  for (n = 0; n < 4; n++)
334  ThrowGib(self, "models/objects/gibs/sm_meat/tris.md2", damage, GIB_ORGANIC);
335  ThrowHead(self, "models/objects/gibs/head2/tris.md2", damage, GIB_ORGANIC);
336  self->deadflag = DEAD_DEAD;
337  return;
338  }
339 
340  if (self->deadflag == DEAD_DEAD)
341  return;
342 
343 // regular death
344  gi.sound(self, CHAN_VOICE, sound_death, 1, ATTN_NORM, 0);
345  self->deadflag = DEAD_DEAD;
346  self->takedamage = DAMAGE_YES;
347  self->monsterinfo.currentmove = &gunner_move_death;
348 }
349 
350 
351 void gunner_duck_down(edict_t *self)
352 {
353  if (self->monsterinfo.aiflags & AI_DUCKED)
354  return;
355  self->monsterinfo.aiflags |= AI_DUCKED;
356  if (skill->value >= 2) {
357  if (random() > 0.5)
358  GunnerGrenade(self);
359  }
360 
361  self->maxs[2] -= 32;
362  self->takedamage = DAMAGE_YES;
363  self->monsterinfo.pausetime = level.time + 1;
364  gi.linkentity(self);
365 }
366 
367 void gunner_duck_hold(edict_t *self)
368 {
369  if (level.time >= self->monsterinfo.pausetime)
370  self->monsterinfo.aiflags &= ~AI_HOLD_FRAME;
371  else
372  self->monsterinfo.aiflags |= AI_HOLD_FRAME;
373 }
374 
375 void gunner_duck_up(edict_t *self)
376 {
377  self->monsterinfo.aiflags &= ~AI_DUCKED;
378  self->maxs[2] += 32;
379  self->takedamage = DAMAGE_AIM;
380  gi.linkentity(self);
381 }
382 
384  { ai_move, 1, gunner_duck_down },
385  { ai_move, 1, NULL },
386  { ai_move, 1, gunner_duck_hold },
387  { ai_move, 0, NULL },
388  { ai_move, -1, NULL },
389  { ai_move, -1, NULL },
390  { ai_move, 0, gunner_duck_up },
391  { ai_move, -1, NULL }
392 };
394 
395 void gunner_dodge(edict_t *self, edict_t *attacker, float eta)
396 {
397  if (random() > 0.25)
398  return;
399 
400  if (!self->enemy)
401  self->enemy = attacker;
402 
403  self->monsterinfo.currentmove = &gunner_move_duck;
404 }
405 
406 
407 void gunner_opengun(edict_t *self)
408 {
409  gi.sound(self, CHAN_VOICE, sound_open, 1, ATTN_IDLE, 0);
410 }
411 
412 void GunnerFire(edict_t *self)
413 {
414  vec3_t start;
415  vec3_t forward, right;
416  vec3_t target;
417  vec3_t aim;
418  int flash_number;
419 
420  flash_number = MZ2_GUNNER_MACHINEGUN_1 + (self->s.frame - FRAME_attak216);
421 
422  AngleVectors(self->s.angles, forward, right, NULL);
423  G_ProjectSource(self->s.origin, monster_flash_offset[flash_number], forward, right, start);
424 
425  // project enemy back a bit and target there
426  VectorCopy(self->enemy->s.origin, target);
427  VectorMA(target, -0.2, self->enemy->velocity, target);
428  target[2] += self->enemy->viewheight;
429 
430  VectorSubtract(target, start, aim);
431  VectorNormalize(aim);
432  monster_fire_bullet(self, start, aim, 3, 4, DEFAULT_BULLET_HSPREAD, DEFAULT_BULLET_VSPREAD, flash_number);
433 }
434 
435 void GunnerGrenade(edict_t *self)
436 {
437  vec3_t start;
438  vec3_t forward, right;
439  vec3_t aim;
440  int flash_number;
441 
442  if (self->s.frame == FRAME_attak105)
443  flash_number = MZ2_GUNNER_GRENADE_1;
444  else if (self->s.frame == FRAME_attak108)
445  flash_number = MZ2_GUNNER_GRENADE_2;
446  else if (self->s.frame == FRAME_attak111)
447  flash_number = MZ2_GUNNER_GRENADE_3;
448  else // (self->s.frame == FRAME_attak114)
449  flash_number = MZ2_GUNNER_GRENADE_4;
450 
451  AngleVectors(self->s.angles, forward, right, NULL);
452  G_ProjectSource(self->s.origin, monster_flash_offset[flash_number], forward, right, start);
453 
454  //FIXME : do a spread -225 -75 75 225 degrees around forward
455  VectorCopy(forward, aim);
456 
457  monster_fire_grenade(self, start, aim, 50, 600, flash_number);
458 }
459 
461  /*
462  { ai_charge, 0, NULL },
463  { ai_charge, 0, NULL },
464  { ai_charge, 0, NULL },
465  { ai_charge, 0, NULL },
466  { ai_charge, 0, NULL },
467  { ai_charge, 0, NULL },
468  { ai_charge, 0, NULL },
469  { ai_charge, 0, NULL },
470  */
471  { ai_charge, 0, gunner_opengun },
472  { ai_charge, 0, NULL },
473  { ai_charge, 0, NULL },
474  { ai_charge, 0, NULL },
475  { ai_charge, 0, NULL },
476  { ai_charge, 0, NULL },
477  { ai_charge, 0, NULL }
478 };
480 
482  { ai_charge, 0, GunnerFire },
483  { ai_charge, 0, GunnerFire },
484  { ai_charge, 0, GunnerFire },
485  { ai_charge, 0, GunnerFire },
486  { ai_charge, 0, GunnerFire },
487  { ai_charge, 0, GunnerFire },
488  { ai_charge, 0, GunnerFire },
489  { ai_charge, 0, GunnerFire }
490 };
492 
494  { ai_charge, 0, NULL },
495  { ai_charge, 0, NULL },
496  { ai_charge, 0, NULL },
497  { ai_charge, 0, NULL },
498  { ai_charge, 0, NULL },
499  { ai_charge, 0, NULL },
500  { ai_charge, 0, NULL }
501 };
503 
505  { ai_charge, 0, NULL },
506  { ai_charge, 0, NULL },
507  { ai_charge, 0, NULL },
508  { ai_charge, 0, NULL },
509  { ai_charge, 0, GunnerGrenade },
510  { ai_charge, 0, NULL },
511  { ai_charge, 0, NULL },
512  { ai_charge, 0, GunnerGrenade },
513  { ai_charge, 0, NULL },
514  { ai_charge, 0, NULL },
515  { ai_charge, 0, GunnerGrenade },
516  { ai_charge, 0, NULL },
517  { ai_charge, 0, NULL },
518  { ai_charge, 0, GunnerGrenade },
519  { ai_charge, 0, NULL },
520  { ai_charge, 0, NULL },
521  { ai_charge, 0, NULL },
522  { ai_charge, 0, NULL },
523  { ai_charge, 0, NULL },
524  { ai_charge, 0, NULL },
525  { ai_charge, 0, NULL }
526 };
528 
529 void gunner_attack(edict_t *self)
530 {
531  if (range(self, self->enemy) == RANGE_MELEE) {
532  self->monsterinfo.currentmove = &gunner_move_attack_chain;
533  } else {
534  if (random() <= 0.5)
535  self->monsterinfo.currentmove = &gunner_move_attack_grenade;
536  else
537  self->monsterinfo.currentmove = &gunner_move_attack_chain;
538  }
539 }
540 
541 void gunner_fire_chain(edict_t *self)
542 {
543  self->monsterinfo.currentmove = &gunner_move_fire_chain;
544 }
545 
546 void gunner_refire_chain(edict_t *self)
547 {
548  if (self->enemy->health > 0)
549  if (visible(self, self->enemy))
550  if (random() <= 0.5) {
551  self->monsterinfo.currentmove = &gunner_move_fire_chain;
552  return;
553  }
554  self->monsterinfo.currentmove = &gunner_move_endfire_chain;
555 }
556 
557 /*QUAKED monster_gunner (1 .5 0) (-16 -16 -24) (16 16 32) Ambush Trigger_Spawn Sight
558 */
559 void SP_monster_gunner(edict_t *self)
560 {
561  if (deathmatch->value) {
562  G_FreeEdict(self);
563  return;
564  }
565 
566  sound_death = gi.soundindex("gunner/death1.wav");
567  sound_pain = gi.soundindex("gunner/gunpain2.wav");
568  sound_pain2 = gi.soundindex("gunner/gunpain1.wav");
569  sound_idle = gi.soundindex("gunner/gunidle1.wav");
570  sound_open = gi.soundindex("gunner/gunatck1.wav");
571  sound_search = gi.soundindex("gunner/gunsrch1.wav");
572  sound_sight = gi.soundindex("gunner/sight1.wav");
573 
574  gi.soundindex("gunner/gunatck2.wav");
575  gi.soundindex("gunner/gunatck3.wav");
576 
577  self->movetype = MOVETYPE_STEP;
578  self->solid = SOLID_BBOX;
579  self->s.modelindex = gi.modelindex("models/monsters/gunner/tris.md2");
580  VectorSet(self->mins, -16, -16, -24);
581  VectorSet(self->maxs, 16, 16, 32);
582 
583  self->health = 175;
584  self->gib_health = -70;
585  self->mass = 200;
586 
587  self->pain = gunner_pain;
588  self->die = gunner_die;
589 
590  self->monsterinfo.stand = gunner_stand;
591  self->monsterinfo.walk = gunner_walk;
592  self->monsterinfo.run = gunner_run;
593  self->monsterinfo.dodge = gunner_dodge;
594  self->monsterinfo.attack = gunner_attack;
595  self->monsterinfo.melee = NULL;
596  self->monsterinfo.sight = gunner_sight;
597  self->monsterinfo.search = gunner_search;
598 
599  gi.linkentity(self);
600 
601  self->monsterinfo.currentmove = &gunner_move_stand;
602  self->monsterinfo.scale = MODEL_SCALE;
603 
604  walkmonster_start(self);
605 }
sound_pain2
static int sound_pain2
Definition: m_gunner.c:31
gi
game_import_t gi
Definition: g_main.c:23
gunner_sight
void gunner_sight(edict_t *self, edict_t *other)
Definition: m_gunner.c:44
gunner_move_runandshoot
mmove_t gunner_move_runandshoot
Definition: m_gunner.c:223
deathmatch
cvar_t * deathmatch
Definition: g_main.c:33
gunner_move_duck
mmove_t gunner_move_duck
Definition: m_gunner.c:393
FRAME_duck01
#define FRAME_duck01
Definition: m_brain.h:168
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
gunner_frames_stand
mframe_t gunner_frames_stand[]
Definition: m_gunner.c:129
DEAD_DEAD
#define DEAD_DEAD
Definition: g_local.h:112
FRAME_attak224
#define FRAME_attak224
Definition: m_float.h:90
gunner_runandshoot
void gunner_runandshoot(edict_t *self)
Definition: m_gunner.c:225
FRAME_pain118
#define FRAME_pain118
Definition: m_brain.h:127
FRAME_pain301
#define FRAME_pain301
Definition: m_actor.h:102
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
gunner_move_run
mmove_t gunner_move_run
Definition: m_gunner.c:204
FRAME_runs01
#define FRAME_runs01
Definition: m_actor.h:126
ai_charge
void ai_charge(edict_t *self, float dist)
Definition: g_ai.c:175
sound_sight
static int sound_sight
Definition: m_gunner.c:36
FRAME_death11
#define FRAME_death11
Definition: m_berserk.h:255
gunner_frames_death
mframe_t gunner_frames_death[]
Definition: m_gunner.c:309
gunner_frames_walk
mframe_t gunner_frames_walk[]
Definition: m_gunner.c:171
gunner_frames_endfire_chain
mframe_t gunner_frames_endfire_chain[]
Definition: m_gunner.c:493
FRAME_runs06
#define FRAME_runs06
Definition: m_actor.h:131
FRAME_attak209
#define FRAME_attak209
Definition: m_boss31.h:48
FRAME_stand01
#define FRAME_stand01
Definition: m_boss31.h:134
gunner_move_endfire_chain
mmove_t gunner_move_endfire_chain
Definition: m_gunner.c:502
gunner_frames_pain1
mframe_t gunner_frames_pain1[]
Definition: m_gunner.c:251
sound_death
static int sound_death
Definition: m_gunner.c:32
AI_STAND_GROUND
#define AI_STAND_GROUND
Definition: g_local.h:126
FRAME_run01
#define FRAME_run01
Definition: m_actor.h:114
FRAME_pain305
#define FRAME_pain305
Definition: m_boss31.h:113
MODEL_SCALE
#define MODEL_SCALE
Definition: m_actor.h:504
gunner_pain
void gunner_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: m_gunner.c:273
DAMAGE_YES
@ DAMAGE_YES
Definition: g_local.h:88
FRAME_attak216
#define FRAME_attak216
Definition: m_brain.h:108
gunner_frames_attack_grenade
mframe_t gunner_frames_attack_grenade[]
Definition: m_gunner.c:504
gunner_move_attack_grenade
mmove_t gunner_move_attack_grenade
Definition: m_gunner.c:527
monster_fire_grenade
void monster_fire_grenade(edict_t *self, vec3_t start, vec3_t aimdir, int damage, int speed, int flashtype)
Definition: g_monster.c:59
gunner_move_fire_chain
mmove_t gunner_move_fire_chain
Definition: m_gunner.c:491
gunner_frames_attack_chain
mframe_t gunner_frames_attack_chain[]
Definition: m_gunner.c:460
gunner_duck_down
void gunner_duck_down(edict_t *self)
Definition: m_gunner.c:351
other
@ other
Definition: ogg.c:63
FRAME_pain101
#define FRAME_pain101
Definition: m_actor.h:96
walkmonster_start
void walkmonster_start(edict_t *self)
Definition: g_monster.c:630
MOVETYPE_STEP
@ MOVETYPE_STEP
Definition: g_local.h:192
gunner_move_death
mmove_t gunner_move_death
Definition: m_gunner.c:322
gunner_move_fidget
mmove_t gunner_move_fidget
Definition: m_gunner.c:119
FRAME_attak111
#define FRAME_attak111
Definition: m_boss31.h:32
GunnerGrenade
void GunnerGrenade(edict_t *self)
Definition: m_gunner.c:435
gunner_search
void gunner_search(edict_t *self)
Definition: m_gunner.c:49
gunner_opengun
void gunner_opengun(edict_t *self)
Definition: m_gunner.c:407
FRAME_death01
#define FRAME_death01
Definition: m_boss31.h:53
FRAME_run08
#define FRAME_run08
Definition: m_actor.h:121
gunner_idlesound
void gunner_idlesound(edict_t *self)
Definition: m_gunner.c:39
gunner_move_stand
mmove_t gunner_move_stand
Definition: m_gunner.c:163
gunner_frames_run
mframe_t gunner_frames_run[]
Definition: m_gunner.c:193
DEFAULT_BULLET_VSPREAD
#define DEFAULT_BULLET_VSPREAD
Definition: g_local.h:655
FRAME_attak230
#define FRAME_attak230
Definition: m_gunner.h:180
G_FreeEdict
void G_FreeEdict(edict_t *e)
Definition: g_utils.c:421
FRAME_stand30
#define FRAME_stand30
Definition: m_boss2.h:22
FRAME_walk07
#define FRAME_walk07
Definition: m_actor.h:279
forward
static vec3_t forward
Definition: p_view.c:27
sound_open
static int sound_open
Definition: m_gunner.c:34
AI_HOLD_FRAME
#define AI_HOLD_FRAME
Definition: g_local.h:133
mframe_t
Definition: g_local.h:394
mmove_t
Definition: g_local.h:400
FRAME_stand31
#define FRAME_stand31
Definition: m_boss2.h:23
gunner_duck_hold
void gunner_duck_hold(edict_t *self)
Definition: m_gunner.c:367
ai_walk
void ai_walk(edict_t *self, float dist)
Definition: g_ai.c:148
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
gunner_fire_chain
void gunner_fire_chain(edict_t *self)
Definition: m_gunner.c:541
gunner_frames_duck
mframe_t gunner_frames_duck[]
Definition: m_gunner.c:383
gunner_frames_fire_chain
mframe_t gunner_frames_fire_chain[]
Definition: m_gunner.c:481
gunner_dead
void gunner_dead(edict_t *self)
Definition: m_gunner.c:299
visible
qboolean visible(edict_t *self, edict_t *other)
Definition: g_ai.c:268
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
gunner_fidget
void gunner_fidget(edict_t *self)
Definition: m_gunner.c:121
m_gunner.h
gunner_attack
void gunner_attack(edict_t *self)
Definition: m_gunner.c:529
skill
cvar_t * skill
Definition: g_main.c:36
sound_search
static int sound_search
Definition: m_gunner.c:35
gunner_frames_fidget
mframe_t gunner_frames_fidget[]
Definition: m_gunner.c:64
ai_move
void ai_move(edict_t *self, float dist)
Definition: g_ai.c:86
FRAME_duck08
#define FRAME_duck08
Definition: m_brain.h:175
level_locals_t::time
float time
Definition: g_local.h:299
FRAME_attak215
#define FRAME_attak215
Definition: m_brain.h:107
gunner_walk
void gunner_walk(edict_t *self)
Definition: m_gunner.c:188
FRAME_attak108
#define FRAME_attak108
Definition: m_boss31.h:29
gunner_dodge
void gunner_dodge(edict_t *self, edict_t *attacker, float eta)
Definition: m_gunner.c:395
RANGE_MELEE
#define RANGE_MELEE
Definition: g_local.h:116
gunner_frames_runandshoot
mframe_t gunner_frames_runandshoot[]
Definition: m_gunner.c:214
sound_idle
static int sound_idle
Definition: m_gunner.c:33
DAMAGE_AIM
@ DAMAGE_AIM
Definition: g_local.h:89
GunnerFire
void GunnerFire(edict_t *self)
Definition: m_gunner.c:412
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
gunner_move_walk
mmove_t gunner_move_walk
Definition: m_gunner.c:186
GIB_ORGANIC
#define GIB_ORGANIC
Definition: g_local.h:122
FRAME_pain208
#define FRAME_pain208
Definition: m_brain.h:138
level
level_locals_t level
Definition: g_main.c:22
gunner_move_attack_chain
mmove_t gunner_move_attack_chain
Definition: m_gunner.c:479
FRAME_attak105
#define FRAME_attak105
Definition: m_boss31.h:26
monster_flash_offset
const vec3_t monster_flash_offset[256]
Definition: m_flash.c:25
ThrowHead
void ThrowHead(edict_t *self, char *gibname, int damage, int type)
Definition: g_misc.c:175
FRAME_attak121
#define FRAME_attak121
Definition: m_chick.h:42
FRAME_walk19
#define FRAME_walk19
Definition: m_boss2.h:90
FRAME_pain201
#define FRAME_pain201
Definition: m_actor.h:99
gunner_frames_pain3
mframe_t gunner_frames_pain3[]
Definition: m_gunner.c:230
gunner_move_pain1
mmove_t gunner_move_pain1
Definition: m_gunner.c:271
MOVETYPE_TOSS
@ MOVETYPE_TOSS
Definition: g_local.h:194
range
int range(edict_t *self, edict_t *other)
Definition: g_ai.c:245
gunner_run
void gunner_run(edict_t *self)
Definition: m_gunner.c:206
gunner_refire_chain
void gunner_refire_chain(edict_t *self)
Definition: m_gunner.c:546
gunner_stand
void gunner_stand(edict_t *self)
Definition: m_gunner.c:165
gunner_frames_pain2
mframe_t gunner_frames_pain2[]
Definition: m_gunner.c:239
SP_monster_gunner
void SP_monster_gunner(edict_t *self)
Definition: m_gunner.c:559
FRAME_stand70
#define FRAME_stand70
Definition: m_gunner.h:91
AI_DUCKED
#define AI_DUCKED
Definition: g_local.h:137
gunner_die
void gunner_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: m_gunner.c:324
VectorNormalize
vec_t VectorNormalize(vec3_t v)
Definition: shared.c:55
ai_stand
void ai_stand(edict_t *self, float dist)
Definition: g_ai.c:100
gunner_move_pain2
mmove_t gunner_move_pain2
Definition: m_gunner.c:249
sound_pain
static int sound_pain
Definition: m_gunner.c:30
gunner_duck_up
void gunner_duck_up(edict_t *self)
Definition: m_gunner.c:375
FRAME_attak101
#define FRAME_attak101
Definition: m_boss31.h:22
FRAME_attak223
#define FRAME_attak223
Definition: m_float.h:89
g_local.h
gunner_move_pain3
mmove_t gunner_move_pain3
Definition: m_gunner.c:237