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