vkQuake2 doxygen  1.0 dev
m_gunner.c File Reference
#include "g_local.h"
#include "m_gunner.h"

Go to the source code of this file.

Functions

void gunner_idlesound (edict_t *self)
 
void gunner_sight (edict_t *self, edict_t *other)
 
void gunner_search (edict_t *self)
 
qboolean visible (edict_t *self, edict_t *other)
 
void GunnerGrenade (edict_t *self)
 
void GunnerFire (edict_t *self)
 
void gunner_fire_chain (edict_t *self)
 
void gunner_refire_chain (edict_t *self)
 
void gunner_stand (edict_t *self)
 
void gunner_fidget (edict_t *self)
 
void gunner_walk (edict_t *self)
 
void gunner_run (edict_t *self)
 
void gunner_runandshoot (edict_t *self)
 
void gunner_pain (edict_t *self, edict_t *other, float kick, int damage)
 
void gunner_dead (edict_t *self)
 
void gunner_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
 
void gunner_duck_down (edict_t *self)
 
void gunner_duck_hold (edict_t *self)
 
void gunner_duck_up (edict_t *self)
 
void gunner_dodge (edict_t *self, edict_t *attacker, float eta)
 
void gunner_opengun (edict_t *self)
 
void gunner_attack (edict_t *self)
 
void SP_monster_gunner (edict_t *self)
 

Variables

static int sound_pain
 
static int sound_pain2
 
static int sound_death
 
static int sound_idle
 
static int sound_open
 
static int sound_search
 
static int sound_sight
 
mframe_t gunner_frames_fidget []
 
mmove_t gunner_move_fidget = {FRAME_stand31, FRAME_stand70, gunner_frames_fidget, gunner_stand}
 
mframe_t gunner_frames_stand []
 
mmove_t gunner_move_stand = {FRAME_stand01, FRAME_stand30, gunner_frames_stand, NULL}
 
mframe_t gunner_frames_walk []
 
mmove_t gunner_move_walk = {FRAME_walk07, FRAME_walk19, gunner_frames_walk, NULL}
 
mframe_t gunner_frames_run []
 
mmove_t gunner_move_run = {FRAME_run01, FRAME_run08, gunner_frames_run, NULL}
 
mframe_t gunner_frames_runandshoot []
 
mmove_t gunner_move_runandshoot = {FRAME_runs01, FRAME_runs06, gunner_frames_runandshoot, NULL}
 
mframe_t gunner_frames_pain3 []
 
mmove_t gunner_move_pain3 = {FRAME_pain301, FRAME_pain305, gunner_frames_pain3, gunner_run}
 
mframe_t gunner_frames_pain2 []
 
mmove_t gunner_move_pain2 = {FRAME_pain201, FRAME_pain208, gunner_frames_pain2, gunner_run}
 
mframe_t gunner_frames_pain1 []
 
mmove_t gunner_move_pain1 = {FRAME_pain101, FRAME_pain118, gunner_frames_pain1, gunner_run}
 
mframe_t gunner_frames_death []
 
mmove_t gunner_move_death = {FRAME_death01, FRAME_death11, gunner_frames_death, gunner_dead}
 
mframe_t gunner_frames_duck []
 
mmove_t gunner_move_duck = {FRAME_duck01, FRAME_duck08, gunner_frames_duck, gunner_run}
 
mframe_t gunner_frames_attack_chain []
 
mmove_t gunner_move_attack_chain = {FRAME_attak209, FRAME_attak215, gunner_frames_attack_chain, gunner_fire_chain}
 
mframe_t gunner_frames_fire_chain []
 
mmove_t gunner_move_fire_chain = {FRAME_attak216, FRAME_attak223, gunner_frames_fire_chain, gunner_refire_chain}
 
mframe_t gunner_frames_endfire_chain []
 
mmove_t gunner_move_endfire_chain = {FRAME_attak224, FRAME_attak230, gunner_frames_endfire_chain, gunner_run}
 
mframe_t gunner_frames_attack_grenade []
 
mmove_t gunner_move_attack_grenade = {FRAME_attak101, FRAME_attak121, gunner_frames_attack_grenade, gunner_run}
 

Function Documentation

◆ gunner_attack()

void gunner_attack ( edict_t self)

Definition at line 547 of file m_gunner.c.

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 }

Referenced by SP_monster_gunner().

◆ gunner_dead()

void gunner_dead ( edict_t self)

Definition at line 309 of file m_gunner.c.

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 }

◆ gunner_die()

void gunner_die ( edict_t self,
edict_t inflictor,
edict_t attacker,
int  damage,
vec3_t  point 
)

Definition at line 335 of file m_gunner.c.

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 }

Referenced by SP_monster_gunner().

◆ gunner_dodge()

void gunner_dodge ( edict_t self,
edict_t attacker,
float  eta 
)

Definition at line 409 of file m_gunner.c.

410 {
411  if (random() > 0.25)
412  return;
413 
414  if (!self->enemy)
415  self->enemy = attacker;
416 
418 }

Referenced by SP_monster_gunner().

◆ gunner_duck_down()

void gunner_duck_down ( edict_t self)

Definition at line 363 of file m_gunner.c.

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 }

◆ gunner_duck_hold()

void gunner_duck_hold ( edict_t self)

Definition at line 380 of file m_gunner.c.

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 }

◆ gunner_duck_up()

void gunner_duck_up ( edict_t self)

Definition at line 388 of file m_gunner.c.

389 {
390  self->monsterinfo.aiflags &= ~AI_DUCKED;
391  self->maxs[2] += 32;
392  self->takedamage = DAMAGE_AIM;
393  gi.linkentity (self);
394 }

◆ gunner_fidget()

void gunner_fidget ( edict_t self)

Definition at line 124 of file m_gunner.c.

125 {
126  if (self->monsterinfo.aiflags & AI_STAND_GROUND)
127  return;
128  if (random() <= 0.05)
129  self->monsterinfo.currentmove = &gunner_move_fidget;
130 }

◆ gunner_fire_chain()

void gunner_fire_chain ( edict_t self)

Definition at line 562 of file m_gunner.c.

563 {
564  self->monsterinfo.currentmove = &gunner_move_fire_chain;
565 }

◆ gunner_idlesound()

void gunner_idlesound ( edict_t self)

Definition at line 41 of file m_gunner.c.

42 {
43  gi.sound (self, CHAN_VOICE, sound_idle, 1, ATTN_IDLE, 0);
44 }

◆ gunner_opengun()

void gunner_opengun ( edict_t self)

Definition at line 421 of file m_gunner.c.

422 {
423  gi.sound (self, CHAN_VOICE, sound_open, 1, ATTN_IDLE, 0);
424 }

◆ gunner_pain()

void gunner_pain ( edict_t self,
edict_t other,
float  kick,
int  damage 
)

Definition at line 283 of file m_gunner.c.

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 }

Referenced by SP_monster_gunner().

◆ gunner_refire_chain()

void gunner_refire_chain ( edict_t self)

Definition at line 567 of file m_gunner.c.

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 }

◆ gunner_run()

void gunner_run ( edict_t self)

Definition at line 212 of file m_gunner.c.

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 }

Referenced by SP_monster_gunner().

◆ gunner_runandshoot()

void gunner_runandshoot ( edict_t self)

Definition at line 232 of file m_gunner.c.

233 {
234  self->monsterinfo.currentmove = &gunner_move_runandshoot;
235 }

◆ gunner_search()

void gunner_search ( edict_t self)

Definition at line 51 of file m_gunner.c.

52 {
53  gi.sound (self, CHAN_VOICE, sound_search, 1, ATTN_NORM, 0);
54 }

Referenced by SP_monster_gunner().

◆ gunner_sight()

void gunner_sight ( edict_t self,
edict_t other 
)

Definition at line 46 of file m_gunner.c.

47 {
48  gi.sound (self, CHAN_VOICE, sound_sight, 1, ATTN_NORM, 0);
49 }

Referenced by SP_monster_gunner().

◆ gunner_stand()

void gunner_stand ( edict_t self)

Definition at line 169 of file m_gunner.c.

170 {
171  self->monsterinfo.currentmove = &gunner_move_stand;
172 }

Referenced by SP_monster_gunner().

◆ gunner_walk()

void gunner_walk ( edict_t self)

Definition at line 193 of file m_gunner.c.

194 {
195  self->monsterinfo.currentmove = &gunner_move_walk;
196 }

Referenced by SP_monster_gunner().

◆ GunnerFire()

void GunnerFire ( edict_t self)

Definition at line 426 of file m_gunner.c.

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 }

◆ GunnerGrenade()

void GunnerGrenade ( edict_t self)

Definition at line 449 of file m_gunner.c.

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 }

Referenced by gunner_duck_down().

◆ SP_monster_gunner()

void SP_monster_gunner ( edict_t self)

Definition at line 581 of file m_gunner.c.

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 }

◆ visible()

qboolean visible ( edict_t self,
edict_t other 
)

Definition at line 287 of file g_ai.c.

288 {
289  vec3_t spot1;
290  vec3_t spot2;
291  trace_t trace;
292 
293  VectorCopy (self->s.origin, spot1);
294  spot1[2] += self->viewheight;
295  VectorCopy (other->s.origin, spot2);
296  spot2[2] += other->viewheight;
297  trace = gi.trace (spot1, vec3_origin, vec3_origin, spot2, self, MASK_OPAQUE);
298 
299  if (trace.fraction == 1.0)
300  return true;
301  return false;
302 }

Referenced by gunner_refire_chain().

Variable Documentation

◆ gunner_frames_attack_chain

mframe_t gunner_frames_attack_chain[]
Initial value:

Definition at line 474 of file m_gunner.c.

◆ gunner_frames_attack_grenade

mframe_t gunner_frames_attack_grenade[]

◆ gunner_frames_death

mframe_t gunner_frames_death[]
Initial value:
=
{
ai_move, -7, NULL,
ai_move, -3, NULL,
ai_move, -5, NULL,
}

Definition at line 319 of file m_gunner.c.

◆ gunner_frames_duck

mframe_t gunner_frames_duck[]
Initial value:

Definition at line 396 of file m_gunner.c.

◆ gunner_frames_endfire_chain

mframe_t gunner_frames_endfire_chain[]
Initial value:

Definition at line 509 of file m_gunner.c.

◆ gunner_frames_fidget

mframe_t gunner_frames_fidget[]

Definition at line 66 of file m_gunner.c.

◆ gunner_frames_fire_chain

mframe_t gunner_frames_fire_chain[]

◆ gunner_frames_pain1

mframe_t gunner_frames_pain1[]
Initial value:
=
{
ai_move, -5, NULL,
ai_move, -1, NULL,
ai_move, -2, NULL,
ai_move, -2, NULL,
}

Definition at line 260 of file m_gunner.c.

◆ gunner_frames_pain2

mframe_t gunner_frames_pain2[]
Initial value:
=
{
ai_move, -2, NULL,
ai_move, 11, NULL,
ai_move, -1, NULL,
ai_move, -7, NULL,
ai_move, -2, NULL,
}

Definition at line 247 of file m_gunner.c.

◆ gunner_frames_pain3

mframe_t gunner_frames_pain3[]
Initial value:
=
{
ai_move, -3, NULL,
}

Definition at line 237 of file m_gunner.c.

◆ gunner_frames_run

mframe_t gunner_frames_run[]
Initial value:
=
{
ai_run, 26, NULL,
ai_run, 9, NULL,
ai_run, 9, NULL,
ai_run, 9, NULL,
ai_run, 15, NULL,
ai_run, 10, NULL,
ai_run, 13, NULL,
}

Definition at line 198 of file m_gunner.c.

◆ gunner_frames_runandshoot

mframe_t gunner_frames_runandshoot[]
Initial value:
=
{
ai_run, 32, NULL,
ai_run, 15, NULL,
ai_run, 10, NULL,
ai_run, 18, NULL,
ai_run, 8, NULL,
ai_run, 20, NULL
}

Definition at line 220 of file m_gunner.c.

◆ gunner_frames_stand

mframe_t gunner_frames_stand[]

Definition at line 132 of file m_gunner.c.

◆ gunner_frames_walk

mframe_t gunner_frames_walk[]
Initial value:
=
{
}

Definition at line 175 of file m_gunner.c.

◆ gunner_move_attack_chain

Definition at line 494 of file m_gunner.c.

Referenced by gunner_attack().

◆ gunner_move_attack_grenade

Definition at line 545 of file m_gunner.c.

Referenced by gunner_attack().

◆ gunner_move_death

Definition at line 333 of file m_gunner.c.

Referenced by gunner_die().

◆ gunner_move_duck

Definition at line 407 of file m_gunner.c.

Referenced by gunner_dodge().

◆ gunner_move_endfire_chain

Definition at line 519 of file m_gunner.c.

Referenced by gunner_refire_chain().

◆ gunner_move_fidget

Definition at line 122 of file m_gunner.c.

Referenced by gunner_fidget().

◆ gunner_move_fire_chain

Definition at line 507 of file m_gunner.c.

Referenced by gunner_fire_chain(), and gunner_refire_chain().

◆ gunner_move_pain1

Definition at line 281 of file m_gunner.c.

Referenced by gunner_pain().

◆ gunner_move_pain2

Definition at line 258 of file m_gunner.c.

Referenced by gunner_pain().

◆ gunner_move_pain3

Definition at line 245 of file m_gunner.c.

Referenced by gunner_pain().

◆ gunner_move_run

Definition at line 210 of file m_gunner.c.

Referenced by gunner_run().

◆ gunner_move_runandshoot

Definition at line 230 of file m_gunner.c.

Referenced by gunner_runandshoot().

◆ gunner_move_stand

Definition at line 167 of file m_gunner.c.

Referenced by gunner_run(), gunner_stand(), and SP_monster_gunner().

◆ gunner_move_walk

Definition at line 191 of file m_gunner.c.

Referenced by gunner_walk().

◆ sound_death

int sound_death
static

Definition at line 34 of file m_gunner.c.

Referenced by gunner_die(), and SP_monster_gunner().

◆ sound_idle

int sound_idle
static

Definition at line 35 of file m_gunner.c.

Referenced by gunner_idlesound(), and SP_monster_gunner().

◆ sound_open

int sound_open
static

Definition at line 36 of file m_gunner.c.

Referenced by gunner_opengun(), and SP_monster_gunner().

◆ sound_pain

int sound_pain
static

Definition at line 32 of file m_gunner.c.

Referenced by gunner_pain(), and SP_monster_gunner().

◆ sound_pain2

int sound_pain2
static

Definition at line 33 of file m_gunner.c.

Referenced by gunner_pain(), and SP_monster_gunner().

◆ sound_search

int sound_search
static

Definition at line 37 of file m_gunner.c.

Referenced by gunner_search(), and SP_monster_gunner().

◆ sound_sight

int sound_sight
static

Definition at line 38 of file m_gunner.c.

Referenced by gunner_sight(), and SP_monster_gunner().

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
edict_s::s
entity_state_t s
Definition: g_local.h:970
deathmatch
cvar_t * deathmatch
Definition: g_main.c:35
gunner_move_duck
mmove_t gunner_move_duck
Definition: m_gunner.c:407
DEAD_DEAD
#define DEAD_DEAD
Definition: g_local.h:115
game_import_t::trace
trace_t(* trace)(vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, edict_t *passent, int contentmask)
Definition: game.h:128
trace_t::fraction
float fraction
Definition: q_shared.h:457
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
edict_s::gib_health
int gib_health
Definition: g_local.h:1059
VectorSubtract
#define VectorSubtract(a, b, c)
Definition: q_shared.h:163
gunner_move_run
mmove_t gunner_move_run
Definition: m_gunner.c:210
entity_state_s::frame
int frame
Definition: q_shared.h:1154
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
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
gunner_move_endfire_chain
mmove_t gunner_move_endfire_chain
Definition: m_gunner.c:519
entity_state_s::origin
vec3_t origin
Definition: q_shared.h:1149
sound_death
static int sound_death
Definition: m_gunner.c:34
AI_STAND_GROUND
#define AI_STAND_GROUND
Definition: g_local.h:129
trace_t
Definition: q_shared.h:453
MZ2_GUNNER_GRENADE_4
#define MZ2_GUNNER_GRENADE_4
Definition: q_shared.h:728
MODEL_SCALE
#define MODEL_SCALE
Definition: m_actor.h:506
edict_s::max_health
int max_health
Definition: g_local.h:1058
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
edict_s::mins
vec3_t mins
Definition: g_local.h:990
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
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
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
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
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
DEFAULT_BULLET_VSPREAD
#define DEFAULT_BULLET_VSPREAD
Definition: g_local.h:671
G_FreeEdict
void G_FreeEdict(edict_t *e)
Definition: g_utils.c:452
monsterinfo_t::pausetime
float pausetime
Definition: g_local.h:436
edict_s::viewheight
int viewheight
Definition: g_local.h:1067
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
edict_s::deadflag
int deadflag
Definition: g_local.h:1060
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
NULL
#define NULL
Definition: q_shared.h:67
monsterinfo_t::aiflags
int aiflags
Definition: g_local.h:421
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_attack
void gunner_attack(edict_t *self)
Definition: m_gunner.c:547
skill
cvar_t * skill
Definition: g_main.c:38
MASK_OPAQUE
#define MASK_OPAQUE
Definition: q_shared.h:400
sound_search
static int sound_search
Definition: m_gunner.c:37
edict_s::velocity
vec3_t velocity
Definition: g_local.h:1030
ai_move
void ai_move(edict_t *self, float dist)
Definition: g_ai.c:92
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::pain_debounce_time
float pain_debounce_time
Definition: g_local.h:1052
edict_s::monsterinfo
monsterinfo_t monsterinfo
Definition: g_local.h:1114
vec3_origin
vec3_t vec3_origin
Definition: q_shared.c:24
RANGE_MELEE
#define RANGE_MELEE
Definition: g_local.h:119
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
VectorMA
void VectorMA(vec3_t veca, float scale, vec3_t vecb, vec3_t vecc)
Definition: q_shared.c:719
edict_s::maxs
vec3_t maxs
Definition: g_local.h:990
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
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_stand
void gunner_stand(edict_t *self)
Definition: m_gunner.c:169
edict_s::enemy
edict_t * enemy
Definition: g_local.h:1076
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
entity_state_s::angles
vec3_t angles
Definition: q_shared.h:1150
vec3_t
vec_t vec3_t[3]
Definition: q_shared.h:134
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
gunner_move_pain3
mmove_t gunner_move_pain3
Definition: m_gunner.c:245
edict_s::health
int health
Definition: g_local.h:1057