Quake II RTX 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 529 of file m_gunner.c.

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 }

Referenced by SP_monster_gunner().

◆ gunner_dead()

void gunner_dead ( edict_t *  self)

Definition at line 299 of file m_gunner.c.

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 }

◆ gunner_die()

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

Definition at line 324 of file m_gunner.c.

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 }

Referenced by SP_monster_gunner().

◆ gunner_dodge()

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

Definition at line 395 of file m_gunner.c.

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 }

Referenced by SP_monster_gunner().

◆ gunner_duck_down()

void gunner_duck_down ( edict_t *  self)

Definition at line 351 of file m_gunner.c.

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 }

◆ gunner_duck_hold()

void gunner_duck_hold ( edict_t *  self)

Definition at line 367 of file m_gunner.c.

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 }

◆ gunner_duck_up()

void gunner_duck_up ( edict_t *  self)

Definition at line 375 of file m_gunner.c.

376 {
377  self->monsterinfo.aiflags &= ~AI_DUCKED;
378  self->maxs[2] += 32;
379  self->takedamage = DAMAGE_AIM;
380  gi.linkentity(self);
381 }

◆ gunner_fidget()

void gunner_fidget ( edict_t *  self)

Definition at line 121 of file m_gunner.c.

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

◆ gunner_fire_chain()

void gunner_fire_chain ( edict_t *  self)

Definition at line 541 of file m_gunner.c.

542 {
543  self->monsterinfo.currentmove = &gunner_move_fire_chain;
544 }

◆ gunner_idlesound()

void gunner_idlesound ( edict_t *  self)

Definition at line 39 of file m_gunner.c.

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

◆ gunner_opengun()

void gunner_opengun ( edict_t *  self)

Definition at line 407 of file m_gunner.c.

408 {
409  gi.sound(self, CHAN_VOICE, sound_open, 1, ATTN_IDLE, 0);
410 }

◆ gunner_pain()

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

Definition at line 273 of file m_gunner.c.

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 }

Referenced by SP_monster_gunner().

◆ gunner_refire_chain()

void gunner_refire_chain ( edict_t *  self)

Definition at line 546 of file m_gunner.c.

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 }

◆ gunner_run()

void gunner_run ( edict_t *  self)

Definition at line 206 of file m_gunner.c.

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 }

Referenced by SP_monster_gunner().

◆ gunner_runandshoot()

void gunner_runandshoot ( edict_t *  self)

Definition at line 225 of file m_gunner.c.

226 {
227  self->monsterinfo.currentmove = &gunner_move_runandshoot;
228 }

◆ gunner_search()

void gunner_search ( edict_t *  self)

Definition at line 49 of file m_gunner.c.

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

Referenced by SP_monster_gunner().

◆ gunner_sight()

void gunner_sight ( edict_t *  self,
edict_t *  other 
)

Definition at line 44 of file m_gunner.c.

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

Referenced by SP_monster_gunner().

◆ gunner_stand()

void gunner_stand ( edict_t *  self)

Definition at line 165 of file m_gunner.c.

166 {
167  self->monsterinfo.currentmove = &gunner_move_stand;
168 }

Referenced by SP_monster_gunner().

◆ gunner_walk()

void gunner_walk ( edict_t *  self)

Definition at line 188 of file m_gunner.c.

189 {
190  self->monsterinfo.currentmove = &gunner_move_walk;
191 }

Referenced by SP_monster_gunner().

◆ GunnerFire()

void GunnerFire ( edict_t *  self)

Definition at line 412 of file m_gunner.c.

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 }

◆ GunnerGrenade()

void GunnerGrenade ( edict_t *  self)

Definition at line 435 of file m_gunner.c.

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 }

Referenced by gunner_duck_down().

◆ SP_monster_gunner()

void SP_monster_gunner ( edict_t *  self)

Definition at line 559 of file m_gunner.c.

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 }

◆ visible()

qboolean visible ( edict_t *  self,
edict_t *  other 
)

Definition at line 268 of file g_ai.c.

269 {
270  vec3_t spot1;
271  vec3_t spot2;
272  trace_t trace;
273 
274  VectorCopy(self->s.origin, spot1);
275  spot1[2] += self->viewheight;
276  VectorCopy(other->s.origin, spot2);
277  spot2[2] += other->viewheight;
278  trace = gi.trace(spot1, vec3_origin, vec3_origin, spot2, self, MASK_OPAQUE);
279 
280  if (trace.fraction == 1.0)
281  return qtrue;
282  return qfalse;
283 }

Referenced by gunner_refire_chain().

Variable Documentation

◆ gunner_frames_attack_chain

mframe_t gunner_frames_attack_chain[]
Initial value:
= {
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL }
}

Definition at line 460 of file m_gunner.c.

◆ gunner_frames_attack_grenade

mframe_t gunner_frames_attack_grenade[]
Initial value:
= {
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL }
}

Definition at line 504 of file m_gunner.c.

◆ gunner_frames_death

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

Definition at line 309 of file m_gunner.c.

◆ gunner_frames_duck

mframe_t gunner_frames_duck[]
Initial value:
= {
{ ai_move, 1, NULL },
{ ai_move, 0, NULL },
{ ai_move, -1, NULL },
{ ai_move, -1, NULL },
{ ai_move, -1, NULL }
}

Definition at line 383 of file m_gunner.c.

◆ gunner_frames_endfire_chain

mframe_t gunner_frames_endfire_chain[]
Initial value:
= {
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL }
}

Definition at line 493 of file m_gunner.c.

◆ gunner_frames_fidget

mframe_t gunner_frames_fidget[]

Definition at line 64 of file m_gunner.c.

◆ gunner_frames_fire_chain

mframe_t gunner_frames_fire_chain[]
Initial value:

Definition at line 481 of file m_gunner.c.

◆ gunner_frames_pain1

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

Definition at line 251 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, 6, NULL },
{ ai_move, 2, NULL },
{ ai_move, -1, NULL },
{ ai_move, -7, NULL },
{ ai_move, -2, NULL },
{ ai_move, -7, NULL }
}

Definition at line 239 of file m_gunner.c.

◆ gunner_frames_pain3

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

Definition at line 230 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 },
{ ai_run, 6, NULL }
}

Definition at line 193 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 214 of file m_gunner.c.

◆ gunner_frames_stand

mframe_t gunner_frames_stand[]

Definition at line 129 of file m_gunner.c.

◆ gunner_frames_walk

mframe_t gunner_frames_walk[]
Initial value:
= {
{ ai_walk, 0, NULL },
{ ai_walk, 3, NULL },
{ ai_walk, 4, NULL },
{ ai_walk, 5, NULL },
{ ai_walk, 7, NULL },
{ ai_walk, 2, NULL },
{ ai_walk, 6, NULL },
{ ai_walk, 4, NULL },
{ ai_walk, 2, NULL },
{ ai_walk, 7, NULL },
{ ai_walk, 5, NULL },
{ ai_walk, 7, NULL },
{ ai_walk, 4, NULL }
}

Definition at line 171 of file m_gunner.c.

◆ gunner_move_attack_chain

Definition at line 479 of file m_gunner.c.

Referenced by gunner_attack().

◆ gunner_move_attack_grenade

Definition at line 527 of file m_gunner.c.

Referenced by gunner_attack().

◆ gunner_move_death

Definition at line 322 of file m_gunner.c.

Referenced by gunner_die().

◆ gunner_move_duck

Definition at line 393 of file m_gunner.c.

Referenced by gunner_dodge().

◆ gunner_move_endfire_chain

Definition at line 502 of file m_gunner.c.

Referenced by gunner_refire_chain().

◆ gunner_move_fidget

Definition at line 119 of file m_gunner.c.

Referenced by gunner_fidget().

◆ gunner_move_fire_chain

Definition at line 491 of file m_gunner.c.

Referenced by gunner_fire_chain(), and gunner_refire_chain().

◆ gunner_move_pain1

Definition at line 271 of file m_gunner.c.

Referenced by gunner_pain().

◆ gunner_move_pain2

Definition at line 249 of file m_gunner.c.

Referenced by gunner_pain().

◆ gunner_move_pain3

Definition at line 237 of file m_gunner.c.

Referenced by gunner_pain().

◆ gunner_move_run

mmove_t gunner_move_run = {FRAME_run01, FRAME_run08, gunner_frames_run, NULL}

Definition at line 204 of file m_gunner.c.

Referenced by gunner_run().

◆ gunner_move_runandshoot

mmove_t gunner_move_runandshoot = {FRAME_runs01, FRAME_runs06, gunner_frames_runandshoot, NULL}

Definition at line 223 of file m_gunner.c.

Referenced by gunner_runandshoot().

◆ gunner_move_stand

mmove_t gunner_move_stand = {FRAME_stand01, FRAME_stand30, gunner_frames_stand, NULL}

Definition at line 163 of file m_gunner.c.

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

◆ gunner_move_walk

mmove_t gunner_move_walk = {FRAME_walk07, FRAME_walk19, gunner_frames_walk, NULL}

Definition at line 186 of file m_gunner.c.

Referenced by gunner_walk().

◆ sound_death

int sound_death
static

Definition at line 32 of file m_gunner.c.

Referenced by gunner_die(), and SP_monster_gunner().

◆ sound_idle

int sound_idle
static

Definition at line 33 of file m_gunner.c.

Referenced by gunner_idlesound(), and SP_monster_gunner().

◆ sound_open

int sound_open
static

Definition at line 34 of file m_gunner.c.

Referenced by gunner_opengun(), and SP_monster_gunner().

◆ sound_pain

int sound_pain
static

Definition at line 30 of file m_gunner.c.

Referenced by gunner_pain(), and SP_monster_gunner().

◆ sound_pain2

int sound_pain2
static

Definition at line 31 of file m_gunner.c.

Referenced by gunner_pain(), and SP_monster_gunner().

◆ sound_search

int sound_search
static

Definition at line 35 of file m_gunner.c.

Referenced by gunner_search(), and SP_monster_gunner().

◆ sound_sight

int sound_sight
static

Definition at line 36 of file m_gunner.c.

Referenced by gunner_sight(), and SP_monster_gunner().

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
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
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
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
gunner_move_endfire_chain
mmove_t gunner_move_endfire_chain
Definition: m_gunner.c:502
sound_death
static int sound_death
Definition: m_gunner.c:32
AI_STAND_GROUND
#define AI_STAND_GROUND
Definition: g_local.h:126
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_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_duck_down
void gunner_duck_down(edict_t *self)
Definition: m_gunner.c:351
other
@ other
Definition: ogg.c:63
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
vec3_origin
vec3_t vec3_origin
Definition: shared.c:21
gunner_move_stand
mmove_t gunner_move_stand
Definition: m_gunner.c:163
DEFAULT_BULLET_VSPREAD
#define DEFAULT_BULLET_VSPREAD
Definition: g_local.h:655
G_FreeEdict
void G_FreeEdict(edict_t *e)
Definition: g_utils.c:421
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
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
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_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
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
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
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
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
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_stand
void gunner_stand(edict_t *self)
Definition: m_gunner.c:165
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
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
gunner_move_pain3
mmove_t gunner_move_pain3
Definition: m_gunner.c:237