Quake II RTX doxygen  1.0 dev
m_infantry.c File Reference
#include "g_local.h"
#include "m_infantry.h"

Go to the source code of this file.

Functions

void InfantryMachineGun (edict_t *self)
 
void infantry_stand (edict_t *self)
 
void infantry_fidget (edict_t *self)
 
void infantry_walk (edict_t *self)
 
void infantry_run (edict_t *self)
 
void infantry_pain (edict_t *self, edict_t *other, float kick, int damage)
 
void infantry_sight (edict_t *self, edict_t *other)
 
void infantry_dead (edict_t *self)
 
void infantry_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
 
void infantry_duck_down (edict_t *self)
 
void infantry_duck_hold (edict_t *self)
 
void infantry_duck_up (edict_t *self)
 
void infantry_dodge (edict_t *self, edict_t *attacker, float eta)
 
void infantry_cock_gun (edict_t *self)
 
void infantry_fire (edict_t *self)
 
void infantry_swing (edict_t *self)
 
void infantry_smack (edict_t *self)
 
void infantry_attack (edict_t *self)
 
void SP_monster_infantry (edict_t *self)
 

Variables

static int sound_pain1
 
static int sound_pain2
 
static int sound_die1
 
static int sound_die2
 
static int sound_gunshot
 
static int sound_weapon_cock
 
static int sound_punch_swing
 
static int sound_punch_hit
 
static int sound_sight
 
static int sound_search
 
static int sound_idle
 
mframe_t infantry_frames_stand []
 
mmove_t infantry_move_stand = {FRAME_stand50, FRAME_stand71, infantry_frames_stand, NULL}
 
mframe_t infantry_frames_fidget []
 
mmove_t infantry_move_fidget = {FRAME_stand01, FRAME_stand49, infantry_frames_fidget, infantry_stand}
 
mframe_t infantry_frames_walk []
 
mmove_t infantry_move_walk = {FRAME_walk03, FRAME_walk14, infantry_frames_walk, NULL}
 
mframe_t infantry_frames_run []
 
mmove_t infantry_move_run = {FRAME_run01, FRAME_run08, infantry_frames_run, NULL}
 
mframe_t infantry_frames_pain1 []
 
mmove_t infantry_move_pain1 = {FRAME_pain101, FRAME_pain110, infantry_frames_pain1, infantry_run}
 
mframe_t infantry_frames_pain2 []
 
mmove_t infantry_move_pain2 = {FRAME_pain201, FRAME_pain210, infantry_frames_pain2, infantry_run}
 
vec3_t aimangles []
 
mframe_t infantry_frames_death1 []
 
mmove_t infantry_move_death1 = {FRAME_death101, FRAME_death120, infantry_frames_death1, infantry_dead}
 
mframe_t infantry_frames_death2 []
 
mmove_t infantry_move_death2 = {FRAME_death201, FRAME_death225, infantry_frames_death2, infantry_dead}
 
mframe_t infantry_frames_death3 []
 
mmove_t infantry_move_death3 = {FRAME_death301, FRAME_death309, infantry_frames_death3, infantry_dead}
 
mframe_t infantry_frames_duck []
 
mmove_t infantry_move_duck = {FRAME_duck01, FRAME_duck05, infantry_frames_duck, infantry_run}
 
mframe_t infantry_frames_attack1 []
 
mmove_t infantry_move_attack1 = {FRAME_attak101, FRAME_attak115, infantry_frames_attack1, infantry_run}
 
mframe_t infantry_frames_attack2 []
 
mmove_t infantry_move_attack2 = {FRAME_attak201, FRAME_attak208, infantry_frames_attack2, infantry_run}
 

Function Documentation

◆ infantry_attack()

void infantry_attack ( edict_t *  self)

Definition at line 515 of file m_infantry.c.

516 {
517  if (range(self, self->enemy) == RANGE_MELEE)
518  self->monsterinfo.currentmove = &infantry_move_attack2;
519  else
520  self->monsterinfo.currentmove = &infantry_move_attack1;
521 }

Referenced by SP_monster_infantry().

◆ infantry_cock_gun()

void infantry_cock_gun ( edict_t *  self)

Definition at line 450 of file m_infantry.c.

451 {
452  int n;
453 
454  gi.sound(self, CHAN_WEAPON, sound_weapon_cock, 1, ATTN_NORM, 0);
455  n = (rand() & 15) + 3 + 7;
456  self->monsterinfo.pausetime = level.time + n * FRAMETIME;
457 }

◆ infantry_dead()

void infantry_dead ( edict_t *  self)

Definition at line 286 of file m_infantry.c.

287 {
288  VectorSet(self->mins, -16, -16, -24);
289  VectorSet(self->maxs, 16, 16, -8);
290  self->movetype = MOVETYPE_TOSS;
291  self->svflags |= SVF_DEADMONSTER;
292  gi.linkentity(self);
293 
294  M_FlyCheck(self);
295 }

◆ infantry_die()

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

Definition at line 365 of file m_infantry.c.

366 {
367  int n;
368 
369 // check for gib
370  if (self->health <= self->gib_health) {
371  gi.sound(self, CHAN_VOICE, gi.soundindex("misc/udeath.wav"), 1, ATTN_NORM, 0);
372  for (n = 0; n < 2; n++)
373  ThrowGib(self, "models/objects/gibs/bone/tris.md2", damage, GIB_ORGANIC);
374  for (n = 0; n < 4; n++)
375  ThrowGib(self, "models/objects/gibs/sm_meat/tris.md2", damage, GIB_ORGANIC);
376  ThrowHead(self, "models/objects/gibs/head2/tris.md2", damage, GIB_ORGANIC);
377  self->deadflag = DEAD_DEAD;
378  return;
379  }
380 
381  if (self->deadflag == DEAD_DEAD)
382  return;
383 
384 // regular death
385  self->deadflag = DEAD_DEAD;
386  self->takedamage = DAMAGE_YES;
387 
388  n = rand() % 3;
389  if (n == 0) {
390  self->monsterinfo.currentmove = &infantry_move_death1;
391  gi.sound(self, CHAN_VOICE, sound_die2, 1, ATTN_NORM, 0);
392  } else if (n == 1) {
393  self->monsterinfo.currentmove = &infantry_move_death2;
394  gi.sound(self, CHAN_VOICE, sound_die1, 1, ATTN_NORM, 0);
395  } else {
396  self->monsterinfo.currentmove = &infantry_move_death3;
397  gi.sound(self, CHAN_VOICE, sound_die2, 1, ATTN_NORM, 0);
398  }
399 }

Referenced by SP_monster_infantry().

◆ infantry_dodge()

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

Definition at line 438 of file m_infantry.c.

439 {
440  if (random() > 0.25)
441  return;
442 
443  if (!self->enemy)
444  self->enemy = attacker;
445 
446  self->monsterinfo.currentmove = &infantry_move_duck;
447 }

Referenced by SP_monster_infantry().

◆ infantry_duck_down()

void infantry_duck_down ( edict_t *  self)

Definition at line 402 of file m_infantry.c.

403 {
404  if (self->monsterinfo.aiflags & AI_DUCKED)
405  return;
406  self->monsterinfo.aiflags |= AI_DUCKED;
407  self->maxs[2] -= 32;
408  self->takedamage = DAMAGE_YES;
409  self->monsterinfo.pausetime = level.time + 1;
410  gi.linkentity(self);
411 }

◆ infantry_duck_hold()

void infantry_duck_hold ( edict_t *  self)

Definition at line 413 of file m_infantry.c.

414 {
415  if (level.time >= self->monsterinfo.pausetime)
416  self->monsterinfo.aiflags &= ~AI_HOLD_FRAME;
417  else
418  self->monsterinfo.aiflags |= AI_HOLD_FRAME;
419 }

◆ infantry_duck_up()

void infantry_duck_up ( edict_t *  self)

Definition at line 421 of file m_infantry.c.

422 {
423  self->monsterinfo.aiflags &= ~AI_DUCKED;
424  self->maxs[2] += 32;
425  self->takedamage = DAMAGE_AIM;
426  gi.linkentity(self);
427 }

◆ infantry_fidget()

void infantry_fidget ( edict_t *  self)

Definition at line 131 of file m_infantry.c.

132 {
133  self->monsterinfo.currentmove = &infantry_move_fidget;
134  gi.sound(self, CHAN_VOICE, sound_idle, 1, ATTN_IDLE, 0);
135 }

Referenced by SP_monster_infantry().

◆ infantry_fire()

void infantry_fire ( edict_t *  self)

Definition at line 459 of file m_infantry.c.

460 {
461  InfantryMachineGun(self);
462 
463  if (level.time >= self->monsterinfo.pausetime)
464  self->monsterinfo.aiflags &= ~AI_HOLD_FRAME;
465  else
466  self->monsterinfo.aiflags |= AI_HOLD_FRAME;
467 }

◆ infantry_pain()

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

Definition at line 207 of file m_infantry.c.

208 {
209  int n;
210 
211  if (self->health < (self->max_health / 2))
212  self->s.skinnum = 1;
213 
214  if (level.time < self->pain_debounce_time)
215  return;
216 
217  self->pain_debounce_time = level.time + 3;
218 
219  if (skill->value == 3)
220  return; // no pain anims in nightmare
221 
222  n = rand() % 2;
223  if (n == 0) {
224  self->monsterinfo.currentmove = &infantry_move_pain1;
225  gi.sound(self, CHAN_VOICE, sound_pain1, 1, ATTN_NORM, 0);
226  } else {
227  self->monsterinfo.currentmove = &infantry_move_pain2;
228  gi.sound(self, CHAN_VOICE, sound_pain2, 1, ATTN_NORM, 0);
229  }
230 }

Referenced by SP_monster_infantry().

◆ infantry_run()

void infantry_run ( edict_t *  self)

Definition at line 170 of file m_infantry.c.

171 {
172  if (self->monsterinfo.aiflags & AI_STAND_GROUND)
173  self->monsterinfo.currentmove = &infantry_move_stand;
174  else
175  self->monsterinfo.currentmove = &infantry_move_run;
176 }

Referenced by SP_monster_infantry().

◆ infantry_sight()

void infantry_sight ( edict_t *  self,
edict_t *  other 
)

Definition at line 281 of file m_infantry.c.

282 {
283  gi.sound(self, CHAN_BODY, sound_sight, 1, ATTN_NORM, 0);
284 }

Referenced by SP_monster_infantry().

◆ infantry_smack()

void infantry_smack ( edict_t *  self)

Definition at line 494 of file m_infantry.c.

495 {
496  vec3_t aim;
497 
498  VectorSet(aim, MELEE_DISTANCE, 0, 0);
499  if (fire_hit(self, aim, (5 + (rand() % 5)), 50))
500  gi.sound(self, CHAN_WEAPON, sound_punch_hit, 1, ATTN_NORM, 0);
501 }

◆ infantry_stand()

void infantry_stand ( edict_t *  self)

Definition at line 72 of file m_infantry.c.

73 {
74  self->monsterinfo.currentmove = &infantry_move_stand;
75 }

Referenced by SP_monster_infantry(), and SP_turret_driver().

◆ infantry_swing()

void infantry_swing ( edict_t *  self)

Definition at line 489 of file m_infantry.c.

490 {
491  gi.sound(self, CHAN_WEAPON, sound_punch_swing, 1, ATTN_NORM, 0);
492 }

◆ infantry_walk()

void infantry_walk ( edict_t *  self)

Definition at line 153 of file m_infantry.c.

154 {
155  self->monsterinfo.currentmove = &infantry_move_walk;
156 }

Referenced by SP_monster_infantry().

◆ InfantryMachineGun()

void InfantryMachineGun ( edict_t *  self)

Definition at line 248 of file m_infantry.c.

249 {
250  vec3_t start, target;
251  vec3_t forward, right;
252  vec3_t vec;
253  int flash_number;
254 
255  if (self->s.frame == FRAME_attak111) {
256  flash_number = MZ2_INFANTRY_MACHINEGUN_1;
257  AngleVectors(self->s.angles, forward, right, NULL);
258  G_ProjectSource(self->s.origin, monster_flash_offset[flash_number], forward, right, start);
259 
260  if (self->enemy) {
261  VectorMA(self->enemy->s.origin, -0.2, self->enemy->velocity, target);
262  target[2] += self->enemy->viewheight;
263  VectorSubtract(target, start, forward);
265  } else {
266  AngleVectors(self->s.angles, forward, right, NULL);
267  }
268  } else {
269  flash_number = MZ2_INFANTRY_MACHINEGUN_2 + (self->s.frame - FRAME_death211);
270 
271  AngleVectors(self->s.angles, forward, right, NULL);
272  G_ProjectSource(self->s.origin, monster_flash_offset[flash_number], forward, right, start);
273 
274  VectorSubtract(self->s.angles, aimangles[flash_number - MZ2_INFANTRY_MACHINEGUN_2], vec);
275  AngleVectors(vec, forward, NULL, NULL);
276  }
277 
278  monster_fire_bullet(self, start, forward, 3, 4, DEFAULT_BULLET_HSPREAD, DEFAULT_BULLET_VSPREAD, flash_number);
279 }

Referenced by infantry_fire().

◆ SP_monster_infantry()

void SP_monster_infantry ( edict_t *  self)

Definition at line 526 of file m_infantry.c.

527 {
528  if (deathmatch->value) {
529  G_FreeEdict(self);
530  return;
531  }
532 
533  sound_pain1 = gi.soundindex("infantry/infpain1.wav");
534  sound_pain2 = gi.soundindex("infantry/infpain2.wav");
535  sound_die1 = gi.soundindex("infantry/infdeth1.wav");
536  sound_die2 = gi.soundindex("infantry/infdeth2.wav");
537 
538  sound_gunshot = gi.soundindex("infantry/infatck1.wav");
539  sound_weapon_cock = gi.soundindex("infantry/infatck3.wav");
540  sound_punch_swing = gi.soundindex("infantry/infatck2.wav");
541  sound_punch_hit = gi.soundindex("infantry/melee2.wav");
542 
543  sound_sight = gi.soundindex("infantry/infsght1.wav");
544  sound_search = gi.soundindex("infantry/infsrch1.wav");
545  sound_idle = gi.soundindex("infantry/infidle1.wav");
546 
547 
548  self->movetype = MOVETYPE_STEP;
549  self->solid = SOLID_BBOX;
550  self->s.modelindex = gi.modelindex("models/monsters/infantry/tris.md2");
551  VectorSet(self->mins, -16, -16, -24);
552  VectorSet(self->maxs, 16, 16, 32);
553 
554  self->health = 100;
555  self->gib_health = -40;
556  self->mass = 200;
557 
558  self->pain = infantry_pain;
559  self->die = infantry_die;
560 
561  self->monsterinfo.stand = infantry_stand;
562  self->monsterinfo.walk = infantry_walk;
563  self->monsterinfo.run = infantry_run;
564  self->monsterinfo.dodge = infantry_dodge;
565  self->monsterinfo.attack = infantry_attack;
566  self->monsterinfo.melee = NULL;
567  self->monsterinfo.sight = infantry_sight;
568  self->monsterinfo.idle = infantry_fidget;
569 
570  gi.linkentity(self);
571 
572  self->monsterinfo.currentmove = &infantry_move_stand;
573  self->monsterinfo.scale = MODEL_SCALE;
574 
575  walkmonster_start(self);
576 }

Variable Documentation

◆ aimangles

vec3_t aimangles[]
Initial value:
= {
{ 0.0, 5.0, 0.0 },
{ 10.0, 15.0, 0.0 },
{ 20.0, 25.0, 0.0 },
{ 25.0, 35.0, 0.0 },
{ 30.0, 40.0, 0.0 },
{ 30.0, 45.0, 0.0 },
{ 25.0, 50.0, 0.0 },
{ 20.0, 40.0, 0.0 },
{ 15.0, 35.0, 0.0 },
{ 40.0, 35.0, 0.0 },
{ 70.0, 35.0, 0.0 },
{ 90.0, 35.0, 0.0 }
}

Definition at line 233 of file m_infantry.c.

Referenced by InfantryMachineGun().

◆ infantry_frames_attack1

mframe_t infantry_frames_attack1[]
Initial value:
= {
{ ai_charge, 4, NULL },
{ ai_charge, -1, NULL },
{ ai_charge, -1, NULL },
{ ai_charge, -1, NULL },
{ ai_charge, 1, NULL },
{ ai_charge, 1, NULL },
{ ai_charge, 2, NULL },
{ ai_charge, -2, NULL },
{ ai_charge, -3, NULL },
{ ai_charge, 5, NULL },
{ ai_charge, -1, NULL },
{ ai_charge, -2, NULL },
{ ai_charge, -3, NULL }
}

Definition at line 469 of file m_infantry.c.

◆ infantry_frames_attack2

mframe_t infantry_frames_attack2[]
Initial value:
= {
{ ai_charge, 3, NULL },
{ ai_charge, 6, NULL },
{ ai_charge, 8, NULL },
{ ai_charge, 5, NULL },
{ ai_charge, 6, NULL },
{ ai_charge, 3, NULL },
}

Definition at line 503 of file m_infantry.c.

◆ infantry_frames_death1

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

Definition at line 297 of file m_infantry.c.

◆ infantry_frames_death2

mframe_t infantry_frames_death2[]
Initial value:
= {
{ ai_move, 0, NULL },
{ ai_move, 1, NULL },
{ ai_move, 5, NULL },
{ ai_move, -1, NULL },
{ ai_move, 0, NULL },
{ ai_move, 1, NULL },
{ ai_move, 1, NULL },
{ ai_move, 4, NULL },
{ ai_move, 3, NULL },
{ ai_move, 0, NULL },
{ ai_move, -6, NULL },
{ ai_move, 4, NULL },
{ ai_move, 0, NULL }
}

Definition at line 322 of file m_infantry.c.

◆ infantry_frames_death3

mframe_t infantry_frames_death3[]
Initial value:
= {
{ ai_move, 0, NULL },
{ ai_move, 0, NULL },
{ ai_move, 0, NULL },
{ ai_move, -6, NULL },
{ ai_move, -11, NULL },
{ ai_move, -3, NULL },
{ ai_move, -11, NULL },
{ ai_move, 0, NULL },
{ ai_move, 0, NULL }
}

Definition at line 351 of file m_infantry.c.

◆ infantry_frames_duck

mframe_t infantry_frames_duck[]
Initial value:
= {
{ ai_move, 3, NULL },
{ ai_move, 0, NULL }
}

Definition at line 429 of file m_infantry.c.

◆ infantry_frames_fidget

mframe_t infantry_frames_fidget[]

Definition at line 78 of file m_infantry.c.

◆ infantry_frames_pain1

mframe_t infantry_frames_pain1[]
Initial value:
= {
{ ai_move, -3, NULL },
{ ai_move, -2, NULL },
{ ai_move, -1, NULL },
{ ai_move, -2, NULL },
{ ai_move, -1, NULL },
{ ai_move, 1, NULL },
{ ai_move, -1, NULL },
{ ai_move, 1, NULL },
{ ai_move, 6, NULL },
{ ai_move, 2, NULL }
}

Definition at line 179 of file m_infantry.c.

◆ infantry_frames_pain2

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

Definition at line 193 of file m_infantry.c.

◆ infantry_frames_run

mframe_t infantry_frames_run[]
Initial value:
= {
{ ai_run, 10, NULL },
{ ai_run, 20, NULL },
{ ai_run, 5, NULL },
{ ai_run, 7, NULL },
{ ai_run, 30, NULL },
{ ai_run, 35, NULL },
{ ai_run, 2, NULL },
{ ai_run, 6, NULL }
}

Definition at line 158 of file m_infantry.c.

◆ infantry_frames_stand

mframe_t infantry_frames_stand[]
Initial value:
= {
{ ai_stand, 0, NULL },
{ ai_stand, 0, NULL },
{ ai_stand, 0, NULL },
{ ai_stand, 0, NULL },
{ ai_stand, 0, NULL },
{ ai_stand, 0, NULL },
{ ai_stand, 0, NULL },
{ ai_stand, 0, NULL },
{ ai_stand, 0, NULL },
{ ai_stand, 0, NULL },
{ ai_stand, 0, NULL },
{ ai_stand, 0, NULL },
{ ai_stand, 0, NULL },
{ ai_stand, 0, NULL },
{ ai_stand, 0, NULL },
{ ai_stand, 0, NULL },
{ ai_stand, 0, NULL },
{ ai_stand, 0, NULL },
{ ai_stand, 0, NULL },
{ ai_stand, 0, NULL },
{ ai_stand, 0, NULL },
{ ai_stand, 0, NULL }
}

Definition at line 46 of file m_infantry.c.

◆ infantry_frames_walk

mframe_t infantry_frames_walk[]
Initial value:
= {
{ ai_walk, 5, NULL },
{ ai_walk, 4, NULL },
{ ai_walk, 4, NULL },
{ ai_walk, 5, NULL },
{ ai_walk, 4, NULL },
{ ai_walk, 5, NULL },
{ ai_walk, 6, NULL },
{ ai_walk, 4, NULL },
{ ai_walk, 4, NULL },
{ ai_walk, 4, NULL },
{ ai_walk, 4, NULL },
{ ai_walk, 5, NULL }
}

Definition at line 137 of file m_infantry.c.

◆ infantry_move_attack1

Definition at line 486 of file m_infantry.c.

Referenced by infantry_attack().

◆ infantry_move_attack2

Definition at line 513 of file m_infantry.c.

Referenced by infantry_attack().

◆ infantry_move_death1

Definition at line 319 of file m_infantry.c.

Referenced by infantry_die().

◆ infantry_move_death2

Definition at line 349 of file m_infantry.c.

Referenced by infantry_die().

◆ infantry_move_death3

Definition at line 362 of file m_infantry.c.

Referenced by infantry_die().

◆ infantry_move_duck

Definition at line 436 of file m_infantry.c.

Referenced by infantry_dodge().

◆ infantry_move_fidget

Definition at line 129 of file m_infantry.c.

Referenced by infantry_fidget().

◆ infantry_move_pain1

Definition at line 191 of file m_infantry.c.

Referenced by infantry_pain().

◆ infantry_move_pain2

Definition at line 205 of file m_infantry.c.

Referenced by infantry_pain().

◆ infantry_move_run

mmove_t infantry_move_run = {FRAME_run01, FRAME_run08, infantry_frames_run, NULL}

Definition at line 168 of file m_infantry.c.

Referenced by infantry_run().

◆ infantry_move_stand

mmove_t infantry_move_stand = {FRAME_stand50, FRAME_stand71, infantry_frames_stand, NULL}

Definition at line 70 of file m_infantry.c.

Referenced by infantry_run(), infantry_stand(), and SP_monster_infantry().

◆ infantry_move_walk

mmove_t infantry_move_walk = {FRAME_walk03, FRAME_walk14, infantry_frames_walk, NULL}

Definition at line 151 of file m_infantry.c.

Referenced by infantry_walk().

◆ sound_die1

int sound_die1
static

Definition at line 34 of file m_infantry.c.

Referenced by infantry_die(), and SP_monster_infantry().

◆ sound_die2

int sound_die2
static

Definition at line 35 of file m_infantry.c.

Referenced by infantry_die(), and SP_monster_infantry().

◆ sound_gunshot

int sound_gunshot
static

Definition at line 37 of file m_infantry.c.

Referenced by SP_monster_infantry().

◆ sound_idle

int sound_idle
static

Definition at line 43 of file m_infantry.c.

Referenced by infantry_fidget(), and SP_monster_infantry().

◆ sound_pain1

int sound_pain1
static

Definition at line 32 of file m_infantry.c.

Referenced by infantry_pain(), and SP_monster_infantry().

◆ sound_pain2

int sound_pain2
static

Definition at line 33 of file m_infantry.c.

Referenced by infantry_pain(), and SP_monster_infantry().

◆ sound_punch_hit

int sound_punch_hit
static

Definition at line 40 of file m_infantry.c.

Referenced by infantry_smack(), and SP_monster_infantry().

◆ sound_punch_swing

int sound_punch_swing
static

Definition at line 39 of file m_infantry.c.

Referenced by infantry_swing(), and SP_monster_infantry().

◆ sound_search

int sound_search
static

Definition at line 42 of file m_infantry.c.

Referenced by SP_monster_infantry().

◆ sound_sight

int sound_sight
static

Definition at line 41 of file m_infantry.c.

Referenced by infantry_sight(), and SP_monster_infantry().

◆ sound_weapon_cock

int sound_weapon_cock
static

Definition at line 38 of file m_infantry.c.

Referenced by infantry_cock_gun(), and SP_monster_infantry().

gi
game_import_t gi
Definition: g_main.c:23
FRAME_death211
#define FRAME_death211
Definition: m_actor.h:43
deathmatch
cvar_t * deathmatch
Definition: g_main.c:33
sound_gunshot
static int sound_gunshot
Definition: m_infantry.c:37
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
MELEE_DISTANCE
#define MELEE_DISTANCE
Definition: g_local.h:82
ai_charge
void ai_charge(edict_t *self, float dist)
Definition: g_ai.c:175
infantry_die
void infantry_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: m_infantry.c:365
sound_pain1
static int sound_pain1
Definition: m_infantry.c:32
FRAMETIME
#define FRAMETIME
Definition: g_local.h:75
infantry_move_stand
mmove_t infantry_move_stand
Definition: m_infantry.c:70
infantry_move_pain1
mmove_t infantry_move_pain1
Definition: m_infantry.c:191
infantry_cock_gun
void infantry_cock_gun(edict_t *self)
Definition: m_infantry.c:450
AI_STAND_GROUND
#define AI_STAND_GROUND
Definition: g_local.h:126
sound_die2
static int sound_die2
Definition: m_infantry.c:35
infantry_duck_up
void infantry_duck_up(edict_t *self)
Definition: m_infantry.c:421
infantry_move_death1
mmove_t infantry_move_death1
Definition: m_infantry.c:319
InfantryMachineGun
void InfantryMachineGun(edict_t *self)
Definition: m_infantry.c:248
MODEL_SCALE
#define MODEL_SCALE
Definition: m_actor.h:504
sound_punch_swing
static int sound_punch_swing
Definition: m_infantry.c:39
sound_pain2
static int sound_pain2
Definition: m_infantry.c:33
DAMAGE_YES
@ DAMAGE_YES
Definition: g_local.h:88
infantry_duck_hold
void infantry_duck_hold(edict_t *self)
Definition: m_infantry.c:413
infantry_fire
void infantry_fire(edict_t *self)
Definition: m_infantry.c:459
infantry_swing
void infantry_swing(edict_t *self)
Definition: m_infantry.c:489
infantry_walk
void infantry_walk(edict_t *self)
Definition: m_infantry.c:153
fire_hit
qboolean fire_hit(edict_t *self, vec3_t aim, int damage, int kick)
Definition: g_weapon.c:59
sound_weapon_cock
static int sound_weapon_cock
Definition: m_infantry.c:38
walkmonster_start
void walkmonster_start(edict_t *self)
Definition: g_monster.c:630
MOVETYPE_STEP
@ MOVETYPE_STEP
Definition: g_local.h:192
FRAME_attak111
#define FRAME_attak111
Definition: m_boss31.h:32
sound_idle
static int sound_idle
Definition: m_infantry.c:43
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
infantry_dodge
void infantry_dodge(edict_t *self, edict_t *attacker, float eta)
Definition: m_infantry.c:438
infantry_attack
void infantry_attack(edict_t *self)
Definition: m_infantry.c:515
forward
static vec3_t forward
Definition: p_view.c:27
AI_HOLD_FRAME
#define AI_HOLD_FRAME
Definition: g_local.h:133
infantry_move_walk
mmove_t infantry_move_walk
Definition: m_infantry.c:151
infantry_smack
void infantry_smack(edict_t *self)
Definition: m_infantry.c:494
infantry_move_attack1
mmove_t infantry_move_attack1
Definition: m_infantry.c:486
infantry_move_pain2
mmove_t infantry_move_pain2
Definition: m_infantry.c:205
aimangles
vec3_t aimangles[]
Definition: m_infantry.c:233
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
infantry_duck_down
void infantry_duck_down(edict_t *self)
Definition: m_infantry.c:402
sound_search
static int sound_search
Definition: m_infantry.c:42
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
infantry_pain
void infantry_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: m_infantry.c:207
skill
cvar_t * skill
Definition: g_main.c:36
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
RANGE_MELEE
#define RANGE_MELEE
Definition: g_local.h:116
infantry_move_fidget
mmove_t infantry_move_fidget
Definition: m_infantry.c:129
DAMAGE_AIM
@ DAMAGE_AIM
Definition: g_local.h:89
sound_die1
static int sound_die1
Definition: m_infantry.c:34
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
GIB_ORGANIC
#define GIB_ORGANIC
Definition: g_local.h:122
level
level_locals_t level
Definition: g_main.c:22
M_FlyCheck
void M_FlyCheck(edict_t *self)
Definition: g_monster.c:121
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
infantry_stand
void infantry_stand(edict_t *self)
Definition: m_infantry.c:72
infantry_run
void infantry_run(edict_t *self)
Definition: m_infantry.c:170
infantry_move_death2
mmove_t infantry_move_death2
Definition: m_infantry.c:349
MOVETYPE_TOSS
@ MOVETYPE_TOSS
Definition: g_local.h:194
range
int range(edict_t *self, edict_t *other)
Definition: g_ai.c:245
infantry_sight
void infantry_sight(edict_t *self, edict_t *other)
Definition: m_infantry.c:281
infantry_move_death3
mmove_t infantry_move_death3
Definition: m_infantry.c:362
infantry_move_duck
mmove_t infantry_move_duck
Definition: m_infantry.c:436
infantry_move_run
mmove_t infantry_move_run
Definition: m_infantry.c:168
infantry_move_attack2
mmove_t infantry_move_attack2
Definition: m_infantry.c:513
AI_DUCKED
#define AI_DUCKED
Definition: g_local.h:137
sound_sight
static int sound_sight
Definition: m_infantry.c:41
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
sound_punch_hit
static int sound_punch_hit
Definition: m_infantry.c:40
infantry_fidget
void infantry_fidget(edict_t *self)
Definition: m_infantry.c:131