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

Go to the source code of this file.

Functions

void tank_refire_rocket (edict_t *self)
 
void tank_doattack_rocket (edict_t *self)
 
void tank_reattack_blaster (edict_t *self)
 
void tank_sight (edict_t *self, edict_t *other)
 
void tank_footstep (edict_t *self)
 
void tank_thud (edict_t *self)
 
void tank_windup (edict_t *self)
 
void tank_idle (edict_t *self)
 
void tank_stand (edict_t *self)
 
void tank_walk (edict_t *self)
 
void tank_run (edict_t *self)
 
void tank_pain (edict_t *self, edict_t *other, float kick, int damage)
 
void TankBlaster (edict_t *self)
 
void TankStrike (edict_t *self)
 
void TankRocket (edict_t *self)
 
void TankMachineGun (edict_t *self)
 
void tank_poststrike (edict_t *self)
 
void tank_attack (edict_t *self)
 
void tank_dead (edict_t *self)
 
void tank_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
 
void SP_monster_tank (edict_t *self)
 

Variables

static int sound_thud
 
static int sound_pain
 
static int sound_idle
 
static int sound_die
 
static int sound_step
 
static int sound_sight
 
static int sound_windup
 
static int sound_strike
 
mframe_t tank_frames_stand []
 
mmove_t tank_move_stand = {FRAME_stand01, FRAME_stand30, tank_frames_stand, NULL}
 
mframe_t tank_frames_start_walk []
 
mmove_t tank_move_start_walk = {FRAME_walk01, FRAME_walk04, tank_frames_start_walk, tank_walk}
 
mframe_t tank_frames_walk []
 
mmove_t tank_move_walk = {FRAME_walk05, FRAME_walk20, tank_frames_walk, NULL}
 
mframe_t tank_frames_stop_walk []
 
mmove_t tank_move_stop_walk = {FRAME_walk21, FRAME_walk25, tank_frames_stop_walk, tank_stand}
 
mframe_t tank_frames_start_run []
 
mmove_t tank_move_start_run = {FRAME_walk01, FRAME_walk04, tank_frames_start_run, tank_run}
 
mframe_t tank_frames_run []
 
mmove_t tank_move_run = {FRAME_walk05, FRAME_walk20, tank_frames_run, NULL}
 
mframe_t tank_frames_stop_run []
 
mmove_t tank_move_stop_run = {FRAME_walk21, FRAME_walk25, tank_frames_stop_run, tank_walk}
 
mframe_t tank_frames_pain1 []
 
mmove_t tank_move_pain1 = {FRAME_pain101, FRAME_pain104, tank_frames_pain1, tank_run}
 
mframe_t tank_frames_pain2 []
 
mmove_t tank_move_pain2 = {FRAME_pain201, FRAME_pain205, tank_frames_pain2, tank_run}
 
mframe_t tank_frames_pain3 []
 
mmove_t tank_move_pain3 = {FRAME_pain301, FRAME_pain316, tank_frames_pain3, tank_run}
 
mframe_t tank_frames_attack_blast []
 
mmove_t tank_move_attack_blast = {FRAME_attak101, FRAME_attak116, tank_frames_attack_blast, tank_reattack_blaster}
 
mframe_t tank_frames_reattack_blast []
 
mmove_t tank_move_reattack_blast = {FRAME_attak111, FRAME_attak116, tank_frames_reattack_blast, tank_reattack_blaster}
 
mframe_t tank_frames_attack_post_blast []
 
mmove_t tank_move_attack_post_blast = {FRAME_attak117, FRAME_attak122, tank_frames_attack_post_blast, tank_run}
 
mframe_t tank_frames_attack_strike []
 
mmove_t tank_move_attack_strike = {FRAME_attak201, FRAME_attak238, tank_frames_attack_strike, tank_poststrike}
 
mframe_t tank_frames_attack_pre_rocket []
 
mmove_t tank_move_attack_pre_rocket = {FRAME_attak301, FRAME_attak321, tank_frames_attack_pre_rocket, tank_doattack_rocket}
 
mframe_t tank_frames_attack_fire_rocket []
 
mmove_t tank_move_attack_fire_rocket = {FRAME_attak322, FRAME_attak330, tank_frames_attack_fire_rocket, tank_refire_rocket}
 
mframe_t tank_frames_attack_post_rocket []
 
mmove_t tank_move_attack_post_rocket = {FRAME_attak331, FRAME_attak353, tank_frames_attack_post_rocket, tank_run}
 
mframe_t tank_frames_attack_chain []
 
mmove_t tank_move_attack_chain = {FRAME_attak401, FRAME_attak429, tank_frames_attack_chain, tank_run}
 
mframe_t tank_frames_death1 []
 
mmove_t tank_move_death = {FRAME_death101, FRAME_death132, tank_frames_death1, tank_dead}
 

Function Documentation

◆ SP_monster_tank()

void SP_monster_tank ( edict_t *  self)

Definition at line 752 of file m_tank.c.

753 {
754  if (deathmatch->value) {
755  G_FreeEdict(self);
756  return;
757  }
758 
759  self->s.modelindex = gi.modelindex("models/monsters/tank/tris.md2");
760  VectorSet(self->mins, -32, -32, -16);
761  VectorSet(self->maxs, 32, 32, 72);
762  self->movetype = MOVETYPE_STEP;
763  self->solid = SOLID_BBOX;
764 
765  sound_pain = gi.soundindex("tank/tnkpain2.wav");
766  sound_thud = gi.soundindex("tank/tnkdeth2.wav");
767  sound_idle = gi.soundindex("tank/tnkidle1.wav");
768  sound_die = gi.soundindex("tank/death.wav");
769  sound_step = gi.soundindex("tank/step.wav");
770  sound_windup = gi.soundindex("tank/tnkatck4.wav");
771  sound_strike = gi.soundindex("tank/tnkatck5.wav");
772  sound_sight = gi.soundindex("tank/sight1.wav");
773 
774  gi.soundindex("tank/tnkatck1.wav");
775  gi.soundindex("tank/tnkatk2a.wav");
776  gi.soundindex("tank/tnkatk2b.wav");
777  gi.soundindex("tank/tnkatk2c.wav");
778  gi.soundindex("tank/tnkatk2d.wav");
779  gi.soundindex("tank/tnkatk2e.wav");
780  gi.soundindex("tank/tnkatck3.wav");
781 
782  if (strcmp(self->classname, "monster_tank_commander") == 0) {
783  self->health = 1000;
784  self->gib_health = -225;
785  } else {
786  self->health = 750;
787  self->gib_health = -200;
788  }
789 
790  self->mass = 500;
791 
792  self->pain = tank_pain;
793  self->die = tank_die;
794  self->monsterinfo.stand = tank_stand;
795  self->monsterinfo.walk = tank_walk;
796  self->monsterinfo.run = tank_run;
797  self->monsterinfo.dodge = NULL;
798  self->monsterinfo.attack = tank_attack;
799  self->monsterinfo.melee = NULL;
800  self->monsterinfo.sight = tank_sight;
801  self->monsterinfo.idle = tank_idle;
802 
803  gi.linkentity(self);
804 
805  self->monsterinfo.currentmove = &tank_move_stand;
806  self->monsterinfo.scale = MODEL_SCALE;
807 
808  walkmonster_start(self);
809 
810  if (strcmp(self->classname, "monster_tank_commander") == 0)
811  self->s.skinnum = 2;
812 }

◆ tank_attack()

void tank_attack ( edict_t *  self)

Definition at line 625 of file m_tank.c.

626 {
627  vec3_t vec;
628  float range;
629  float r;
630 
631  if (self->enemy->health < 0) {
632  self->monsterinfo.currentmove = &tank_move_attack_strike;
633  self->monsterinfo.aiflags &= ~AI_BRUTAL;
634  return;
635  }
636 
637  VectorSubtract(self->enemy->s.origin, self->s.origin, vec);
638  range = VectorLength(vec);
639 
640  r = random();
641 
642  if (range <= 125) {
643  if (r < 0.4)
644  self->monsterinfo.currentmove = &tank_move_attack_chain;
645  else
646  self->monsterinfo.currentmove = &tank_move_attack_blast;
647  } else if (range <= 250) {
648  if (r < 0.5)
649  self->monsterinfo.currentmove = &tank_move_attack_chain;
650  else
651  self->monsterinfo.currentmove = &tank_move_attack_blast;
652  } else {
653  if (r < 0.33)
654  self->monsterinfo.currentmove = &tank_move_attack_chain;
655  else if (r < 0.66) {
656  self->monsterinfo.currentmove = &tank_move_attack_pre_rocket;
657  self->pain_debounce_time = level.time + 5.0; // no pain for a while
658  } else
659  self->monsterinfo.currentmove = &tank_move_attack_blast;
660  }
661 }

Referenced by SP_monster_tank().

◆ tank_dead()

void tank_dead ( edict_t *  self)

Definition at line 668 of file m_tank.c.

669 {
670  VectorSet(self->mins, -16, -16, -16);
671  VectorSet(self->maxs, 16, 16, -0);
672  self->movetype = MOVETYPE_TOSS;
673  self->svflags |= SVF_DEADMONSTER;
674  self->nextthink = 0;
675  gi.linkentity(self);
676 }

◆ tank_die()

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

Definition at line 714 of file m_tank.c.

715 {
716  int n;
717 
718 // check for gib
719  if (self->health <= self->gib_health) {
720  gi.sound(self, CHAN_VOICE, gi.soundindex("misc/udeath.wav"), 1, ATTN_NORM, 0);
721  for (n = 0; n < 1 /*4*/; n++)
722  ThrowGib(self, "models/objects/gibs/sm_meat/tris.md2", damage, GIB_ORGANIC);
723  for (n = 0; n < 4; n++)
724  ThrowGib(self, "models/objects/gibs/sm_metal/tris.md2", damage, GIB_METALLIC);
725  ThrowGib(self, "models/objects/gibs/chest/tris.md2", damage, GIB_ORGANIC);
726  ThrowHead(self, "models/objects/gibs/gear/tris.md2", damage, GIB_METALLIC);
727  self->deadflag = DEAD_DEAD;
728  return;
729  }
730 
731  if (self->deadflag == DEAD_DEAD)
732  return;
733 
734 // regular death
735  gi.sound(self, CHAN_VOICE, sound_die, 1, ATTN_NORM, 0);
736  self->deadflag = DEAD_DEAD;
737  self->takedamage = DAMAGE_YES;
738 
739  self->monsterinfo.currentmove = &tank_move_death;
740 
741 }

Referenced by SP_monster_tank().

◆ tank_doattack_rocket()

void tank_doattack_rocket ( edict_t *  self)

Definition at line 620 of file m_tank.c.

621 {
622  self->monsterinfo.currentmove = &tank_move_attack_fire_rocket;
623 }

◆ tank_footstep()

void tank_footstep ( edict_t *  self)

Definition at line 53 of file m_tank.c.

54 {
55  gi.sound(self, CHAN_BODY, sound_step, 1, ATTN_NORM, 0);
56 }

◆ tank_idle()

void tank_idle ( edict_t *  self)

Definition at line 68 of file m_tank.c.

69 {
70  gi.sound(self, CHAN_VOICE, sound_idle, 1, ATTN_IDLE, 0);
71 }

Referenced by SP_monster_tank().

◆ tank_pain()

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

Definition at line 272 of file m_tank.c.

273 {
274  if (self->health < (self->max_health / 2))
275  self->s.skinnum |= 1;
276 
277  if (damage <= 10)
278  return;
279 
280  if (level.time < self->pain_debounce_time)
281  return;
282 
283  if (damage <= 30)
284  if (random() > 0.2)
285  return;
286 
287  // If hard or nightmare, don't go into pain while attacking
288  if (skill->value >= 2) {
289  if ((self->s.frame >= FRAME_attak301) && (self->s.frame <= FRAME_attak330))
290  return;
291  if ((self->s.frame >= FRAME_attak101) && (self->s.frame <= FRAME_attak116))
292  return;
293  }
294 
295  self->pain_debounce_time = level.time + 3;
296  gi.sound(self, CHAN_VOICE, sound_pain, 1, ATTN_NORM, 0);
297 
298  if (skill->value == 3)
299  return; // no pain anims in nightmare
300 
301  if (damage <= 30)
302  self->monsterinfo.currentmove = &tank_move_pain1;
303  else if (damage <= 60)
304  self->monsterinfo.currentmove = &tank_move_pain2;
305  else
306  self->monsterinfo.currentmove = &tank_move_pain3;
307 }

Referenced by SP_monster_tank().

◆ tank_poststrike()

void tank_poststrike ( edict_t *  self)

Definition at line 457 of file m_tank.c.

458 {
459  self->enemy = NULL;
460  tank_run(self);
461 }

◆ tank_reattack_blaster()

void tank_reattack_blaster ( edict_t *  self)

Definition at line 444 of file m_tank.c.

445 {
446  if (skill->value >= 2)
447  if (visible(self, self->enemy))
448  if (self->enemy->health > 0)
449  if (random() <= 0.6) {
450  self->monsterinfo.currentmove = &tank_move_reattack_blast;
451  return;
452  }
453  self->monsterinfo.currentmove = &tank_move_attack_post_blast;
454 }

◆ tank_refire_rocket()

void tank_refire_rocket ( edict_t *  self)

Definition at line 607 of file m_tank.c.

608 {
609  // Only on hard or nightmare
610  if (skill->value >= 2)
611  if (self->enemy->health > 0)
612  if (visible(self, self->enemy))
613  if (random() <= 0.4) {
614  self->monsterinfo.currentmove = &tank_move_attack_fire_rocket;
615  return;
616  }
617  self->monsterinfo.currentmove = &tank_move_attack_post_rocket;
618 }

◆ tank_run()

void tank_run ( edict_t *  self)

Definition at line 210 of file m_tank.c.

211 {
212  if (self->enemy && self->enemy->client)
213  self->monsterinfo.aiflags |= AI_BRUTAL;
214  else
215  self->monsterinfo.aiflags &= ~AI_BRUTAL;
216 
217  if (self->monsterinfo.aiflags & AI_STAND_GROUND) {
218  self->monsterinfo.currentmove = &tank_move_stand;
219  return;
220  }
221 
222  if (self->monsterinfo.currentmove == &tank_move_walk ||
223  self->monsterinfo.currentmove == &tank_move_start_run) {
224  self->monsterinfo.currentmove = &tank_move_run;
225  } else {
226  self->monsterinfo.currentmove = &tank_move_start_run;
227  }
228 }

Referenced by SP_monster_tank(), and tank_poststrike().

◆ tank_sight()

void tank_sight ( edict_t *  self,
edict_t *  other 
)

Definition at line 47 of file m_tank.c.

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

Referenced by SP_monster_tank().

◆ tank_stand()

void tank_stand ( edict_t *  self)

Definition at line 112 of file m_tank.c.

113 {
114  self->monsterinfo.currentmove = &tank_move_stand;
115 }

Referenced by SP_monster_tank().

◆ tank_thud()

void tank_thud ( edict_t *  self)

Definition at line 58 of file m_tank.c.

59 {
60  gi.sound(self, CHAN_BODY, sound_thud, 1, ATTN_NORM, 0);
61 }

◆ tank_walk()

void tank_walk ( edict_t *  self)

Definition at line 161 of file m_tank.c.

162 {
163  self->monsterinfo.currentmove = &tank_move_walk;
164 }

Referenced by SP_monster_tank().

◆ tank_windup()

void tank_windup ( edict_t *  self)

Definition at line 63 of file m_tank.c.

64 {
65  gi.sound(self, CHAN_WEAPON, sound_windup, 1, ATTN_NORM, 0);
66 }

◆ TankBlaster()

void TankBlaster ( edict_t *  self)

Definition at line 314 of file m_tank.c.

315 {
316  vec3_t forward, right;
317  vec3_t start;
318  vec3_t end;
319  vec3_t dir;
320  int flash_number;
321 
322  if (self->s.frame == FRAME_attak110)
323  flash_number = MZ2_TANK_BLASTER_1;
324  else if (self->s.frame == FRAME_attak113)
325  flash_number = MZ2_TANK_BLASTER_2;
326  else // (self->s.frame == FRAME_attak116)
327  flash_number = MZ2_TANK_BLASTER_3;
328 
329  AngleVectors(self->s.angles, forward, right, NULL);
330  G_ProjectSource(self->s.origin, monster_flash_offset[flash_number], forward, right, start);
331 
332  VectorCopy(self->enemy->s.origin, end);
333  end[2] += self->enemy->viewheight;
334  VectorSubtract(end, start, dir);
335 
336  monster_fire_blaster(self, start, dir, 30, 800, flash_number, EF_BLASTER);
337 }

◆ TankMachineGun()

void TankMachineGun ( edict_t *  self)

Definition at line 370 of file m_tank.c.

371 {
372  vec3_t dir;
373  vec3_t vec;
374  vec3_t start;
375  vec3_t forward, right;
376  int flash_number;
377 
378  flash_number = MZ2_TANK_MACHINEGUN_1 + (self->s.frame - FRAME_attak406);
379 
380  AngleVectors(self->s.angles, forward, right, NULL);
381  G_ProjectSource(self->s.origin, monster_flash_offset[flash_number], forward, right, start);
382 
383  if (self->enemy) {
384  VectorCopy(self->enemy->s.origin, vec);
385  vec[2] += self->enemy->viewheight;
386  VectorSubtract(vec, start, vec);
387  vectoangles(vec, vec);
388  dir[0] = vec[0];
389  } else {
390  dir[0] = 0;
391  }
392  if (self->s.frame <= FRAME_attak415)
393  dir[1] = self->s.angles[1] - 8 * (self->s.frame - FRAME_attak411);
394  else
395  dir[1] = self->s.angles[1] + 8 * (self->s.frame - FRAME_attak419);
396  dir[2] = 0;
397 
398  AngleVectors(dir, forward, NULL, NULL);
399 
400  monster_fire_bullet(self, start, forward, 20, 4, DEFAULT_BULLET_HSPREAD, DEFAULT_BULLET_VSPREAD, flash_number);
401 }

◆ TankRocket()

void TankRocket ( edict_t *  self)

Definition at line 344 of file m_tank.c.

345 {
346  vec3_t forward, right;
347  vec3_t start;
348  vec3_t dir;
349  vec3_t vec;
350  int flash_number;
351 
352  if (self->s.frame == FRAME_attak324)
353  flash_number = MZ2_TANK_ROCKET_1;
354  else if (self->s.frame == FRAME_attak327)
355  flash_number = MZ2_TANK_ROCKET_2;
356  else // (self->s.frame == FRAME_attak330)
357  flash_number = MZ2_TANK_ROCKET_3;
358 
359  AngleVectors(self->s.angles, forward, right, NULL);
360  G_ProjectSource(self->s.origin, monster_flash_offset[flash_number], forward, right, start);
361 
362  VectorCopy(self->enemy->s.origin, vec);
363  vec[2] += self->enemy->viewheight;
364  VectorSubtract(vec, start, dir);
365  VectorNormalize(dir);
366 
367  monster_fire_rocket(self, start, dir, 50, 550, flash_number);
368 }

◆ TankStrike()

void TankStrike ( edict_t *  self)

Definition at line 339 of file m_tank.c.

340 {
341  gi.sound(self, CHAN_WEAPON, sound_strike, 1, ATTN_NORM, 0);
342 }

Variable Documentation

◆ sound_die

int sound_die
static

Definition at line 37 of file m_tank.c.

Referenced by SP_monster_tank(), and tank_die().

◆ sound_idle

int sound_idle
static

Definition at line 36 of file m_tank.c.

Referenced by SP_monster_tank(), and tank_idle().

◆ sound_pain

int sound_pain
static

Definition at line 35 of file m_tank.c.

Referenced by SP_monster_tank(), and tank_pain().

◆ sound_sight

int sound_sight
static

Definition at line 39 of file m_tank.c.

Referenced by SP_monster_tank(), and tank_sight().

◆ sound_step

int sound_step
static

Definition at line 38 of file m_tank.c.

Referenced by SP_monster_tank(), and tank_footstep().

◆ sound_strike

int sound_strike
static

Definition at line 41 of file m_tank.c.

Referenced by SP_monster_tank(), and TankStrike().

◆ sound_thud

int sound_thud
static

Definition at line 34 of file m_tank.c.

Referenced by SP_monster_tank(), and tank_thud().

◆ sound_windup

int sound_windup
static

Definition at line 40 of file m_tank.c.

Referenced by SP_monster_tank(), and tank_windup().

◆ tank_frames_attack_blast

mframe_t tank_frames_attack_blast[]
Initial value:
= {
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, -1, NULL },
{ ai_charge, -2, NULL },
{ ai_charge, -1, NULL },
{ ai_charge, -1, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
}

Definition at line 404 of file m_tank.c.

◆ tank_frames_attack_chain

mframe_t tank_frames_attack_chain[]

Definition at line 574 of file m_tank.c.

◆ tank_frames_attack_fire_rocket

mframe_t tank_frames_attack_fire_rocket[]
Initial value:
= {
{ ai_charge, -3, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
}

Definition at line 532 of file m_tank.c.

◆ tank_frames_attack_post_blast

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

Definition at line 434 of file m_tank.c.

◆ tank_frames_attack_post_rocket

mframe_t tank_frames_attack_post_rocket[]
Initial value:
= {
{ ai_charge, 0, NULL },
{ ai_charge, -1, NULL },
{ ai_charge, -1, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 2, NULL },
{ ai_charge, 3, NULL },
{ ai_charge, 4, NULL },
{ ai_charge, 2, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, -9, NULL },
{ ai_charge, -8, NULL },
{ ai_charge, -7, NULL },
{ ai_charge, -1, 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 545 of file m_tank.c.

◆ tank_frames_attack_pre_rocket

mframe_t tank_frames_attack_pre_rocket[]
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, 1, NULL },
{ ai_charge, 2, NULL },
{ ai_charge, 7, NULL },
{ ai_charge, 7, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, 0, NULL },
{ ai_charge, -3, NULL }
}

Definition at line 505 of file m_tank.c.

◆ tank_frames_attack_strike

mframe_t tank_frames_attack_strike[]

Definition at line 463 of file m_tank.c.

◆ tank_frames_death1

mframe_t tank_frames_death1[]

Definition at line 678 of file m_tank.c.

◆ tank_frames_pain1

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

Definition at line 234 of file m_tank.c.

◆ tank_frames_pain2

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

Definition at line 242 of file m_tank.c.

◆ tank_frames_pain3

mframe_t tank_frames_pain3[]
Initial value:
= {
{ ai_move, -7, NULL },
{ ai_move, 0, NULL },
{ ai_move, 0, NULL },
{ ai_move, 0, NULL },
{ ai_move, 2, NULL },
{ ai_move, 0, NULL },
{ ai_move, 0, NULL },
{ ai_move, 3, NULL },
{ ai_move, 0, NULL },
{ ai_move, 2, NULL },
{ ai_move, 0, NULL },
{ ai_move, 0, NULL },
{ ai_move, 0, NULL },
{ ai_move, 0, NULL },
{ ai_move, 0, NULL },
}

Definition at line 251 of file m_tank.c.

◆ tank_frames_reattack_blast

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

Definition at line 424 of file m_tank.c.

◆ tank_frames_run

mframe_t tank_frames_run[]
Initial value:
= {
{ ai_run, 4, NULL },
{ ai_run, 5, NULL },
{ ai_run, 3, NULL },
{ ai_run, 2, NULL },
{ ai_run, 5, NULL },
{ ai_run, 5, NULL },
{ ai_run, 4, NULL },
{ ai_run, 3, NULL },
{ ai_run, 5, NULL },
{ ai_run, 4, NULL },
{ ai_run, 5, NULL },
{ ai_run, 7, NULL },
{ ai_run, 7, NULL },
{ ai_run, 6, NULL },
}

Definition at line 181 of file m_tank.c.

◆ tank_frames_stand

mframe_t tank_frames_stand[]

Definition at line 78 of file m_tank.c.

◆ tank_frames_start_run

mframe_t tank_frames_start_run[]
Initial value:
= {
{ ai_run, 0, NULL },
{ ai_run, 6, NULL },
{ ai_run, 6, NULL },
}

Definition at line 173 of file m_tank.c.

◆ tank_frames_start_walk

mframe_t tank_frames_start_walk[]
Initial value:
= {
{ ai_walk, 0, NULL },
{ ai_walk, 6, NULL },
{ ai_walk, 6, NULL },
}

Definition at line 124 of file m_tank.c.

◆ tank_frames_stop_run

mframe_t tank_frames_stop_run[]
Initial value:
= {
{ ai_run, 3, NULL },
{ ai_run, 3, NULL },
{ ai_run, 2, NULL },
{ ai_run, 2, NULL },
}

Definition at line 201 of file m_tank.c.

◆ tank_frames_stop_walk

mframe_t tank_frames_stop_walk[]
Initial value:
= {
{ ai_walk, 3, NULL },
{ ai_walk, 3, NULL },
{ ai_walk, 2, NULL },
{ ai_walk, 2, NULL },
}

Definition at line 152 of file m_tank.c.

◆ tank_frames_walk

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

Definition at line 132 of file m_tank.c.

◆ tank_move_attack_blast

Definition at line 422 of file m_tank.c.

Referenced by tank_attack().

◆ tank_move_attack_chain

Definition at line 605 of file m_tank.c.

Referenced by tank_attack().

◆ tank_move_attack_fire_rocket

Definition at line 543 of file m_tank.c.

Referenced by tank_doattack_rocket(), and tank_refire_rocket().

◆ tank_move_attack_post_blast

Definition at line 442 of file m_tank.c.

Referenced by tank_reattack_blaster().

◆ tank_move_attack_post_rocket

Definition at line 572 of file m_tank.c.

Referenced by tank_refire_rocket().

◆ tank_move_attack_pre_rocket

Definition at line 530 of file m_tank.c.

Referenced by tank_attack().

◆ tank_move_attack_strike

Definition at line 503 of file m_tank.c.

Referenced by tank_attack().

◆ tank_move_death

Definition at line 712 of file m_tank.c.

Referenced by tank_die().

◆ tank_move_pain1

Definition at line 240 of file m_tank.c.

Referenced by tank_pain().

◆ tank_move_pain2

Definition at line 249 of file m_tank.c.

Referenced by tank_pain().

◆ tank_move_pain3

Definition at line 269 of file m_tank.c.

Referenced by tank_pain().

◆ tank_move_reattack_blast

Definition at line 432 of file m_tank.c.

Referenced by tank_reattack_blaster().

◆ tank_move_run

mmove_t tank_move_run = {FRAME_walk05, FRAME_walk20, tank_frames_run, NULL}

Definition at line 199 of file m_tank.c.

Referenced by tank_run().

◆ tank_move_stand

Definition at line 110 of file m_tank.c.

Referenced by SP_monster_tank(), tank_run(), and tank_stand().

◆ tank_move_start_run

Definition at line 179 of file m_tank.c.

Referenced by tank_run().

◆ tank_move_start_walk

Definition at line 130 of file m_tank.c.

◆ tank_move_stop_run

Definition at line 208 of file m_tank.c.

◆ tank_move_stop_walk

Definition at line 159 of file m_tank.c.

◆ tank_move_walk

mmove_t tank_move_walk = {FRAME_walk05, FRAME_walk20, tank_frames_walk, NULL}

Definition at line 150 of file m_tank.c.

Referenced by tank_run(), and tank_walk().

gi
game_import_t gi
Definition: g_main.c:23
deathmatch
cvar_t * deathmatch
Definition: g_main.c:33
tank_die
void tank_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: m_tank.c:714
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
tank_move_reattack_blast
mmove_t tank_move_reattack_blast
Definition: m_tank.c:432
DEAD_DEAD
#define DEAD_DEAD
Definition: g_local.h:112
AI_BRUTAL
#define AI_BRUTAL
Definition: g_local.h:135
tank_idle
void tank_idle(edict_t *self)
Definition: m_tank.c:68
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
tank_stand
void tank_stand(edict_t *self)
Definition: m_tank.c:112
ai_charge
void ai_charge(edict_t *self, float dist)
Definition: g_ai.c:175
sound_pain
static int sound_pain
Definition: m_tank.c:35
AI_STAND_GROUND
#define AI_STAND_GROUND
Definition: g_local.h:126
MODEL_SCALE
#define MODEL_SCALE
Definition: m_actor.h:504
FRAME_attak419
#define FRAME_attak419
Definition: m_boss32.h:249
DAMAGE_YES
@ DAMAGE_YES
Definition: g_local.h:88
sound_sight
static int sound_sight
Definition: m_tank.c:39
walkmonster_start
void walkmonster_start(edict_t *self)
Definition: g_monster.c:630
MOVETYPE_STEP
@ MOVETYPE_STEP
Definition: g_local.h:192
sound_idle
static int sound_idle
Definition: m_tank.c:36
tank_move_pain1
mmove_t tank_move_pain1
Definition: m_tank.c:240
sound_windup
static int sound_windup
Definition: m_tank.c:40
tank_move_attack_blast
mmove_t tank_move_attack_blast
Definition: m_tank.c:422
FRAME_attak406
#define FRAME_attak406
Definition: m_boss32.h:236
tank_move_death
mmove_t tank_move_death
Definition: m_tank.c:712
vectoangles
void vectoangles(vec3_t vec, vec3_t angles)
Definition: g_utils.c:330
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
GIB_METALLIC
#define GIB_METALLIC
Definition: g_local.h:123
sound_thud
static int sound_thud
Definition: m_tank.c:34
TankRocket
void TankRocket(edict_t *self)
Definition: m_tank.c:344
FRAME_attak110
#define FRAME_attak110
Definition: m_boss31.h:31
forward
static vec3_t forward
Definition: p_view.c:27
FRAME_attak301
#define FRAME_attak301
Definition: m_boss32.h:223
FRAME_attak116
#define FRAME_attak116
Definition: m_boss31.h:37
sound_step
static int sound_step
Definition: m_tank.c:38
FRAME_attak415
#define FRAME_attak415
Definition: m_boss32.h:245
tank_footstep
void tank_footstep(edict_t *self)
Definition: m_tank.c:53
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
FRAME_attak324
#define FRAME_attak324
Definition: m_float.h:115
tank_walk
void tank_walk(edict_t *self)
Definition: m_tank.c:161
FRAME_attak327
#define FRAME_attak327
Definition: m_float.h:118
sound_die
static int sound_die
Definition: m_tank.c:37
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
monster_fire_rocket
void monster_fire_rocket(edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, int flashtype)
Definition: g_monster.c:69
skill
cvar_t * skill
Definition: g_main.c:36
tank_move_attack_post_rocket
mmove_t tank_move_attack_post_rocket
Definition: m_tank.c:572
tank_run
void tank_run(edict_t *self)
Definition: m_tank.c:210
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
monster_fire_blaster
void monster_fire_blaster(edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, int flashtype, int effect)
Definition: g_monster.c:49
tank_move_attack_pre_rocket
mmove_t tank_move_attack_pre_rocket
Definition: m_tank.c:530
sound_strike
static int sound_strike
Definition: m_tank.c:41
visible
qboolean visible(edict_t *self, edict_t *other)
Definition: g_ai.c:268
tank_move_attack_chain
mmove_t tank_move_attack_chain
Definition: m_tank.c:605
tank_move_attack_strike
mmove_t tank_move_attack_strike
Definition: m_tank.c:503
tank_move_walk
mmove_t tank_move_walk
Definition: m_tank.c:150
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
FRAME_attak411
#define FRAME_attak411
Definition: m_boss32.h:241
GIB_ORGANIC
#define GIB_ORGANIC
Definition: g_local.h:122
level
level_locals_t level
Definition: g_main.c:22
FRAME_attak330
#define FRAME_attak330
Definition: m_float.h:121
tank_pain
void tank_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: m_tank.c:272
tank_attack
void tank_attack(edict_t *self)
Definition: m_tank.c:625
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
tank_sight
void tank_sight(edict_t *self, edict_t *other)
Definition: m_tank.c:47
MOVETYPE_TOSS
@ MOVETYPE_TOSS
Definition: g_local.h:194
range
int range(edict_t *self, edict_t *other)
Definition: g_ai.c:245
tank_move_run
mmove_t tank_move_run
Definition: m_tank.c:199
tank_move_attack_post_blast
mmove_t tank_move_attack_post_blast
Definition: m_tank.c:442
tank_move_start_run
mmove_t tank_move_start_run
Definition: m_tank.c:179
FRAME_attak113
#define FRAME_attak113
Definition: m_boss31.h:34
VectorNormalize
vec_t VectorNormalize(vec3_t v)
Definition: shared.c:55
TankBlaster
void TankBlaster(edict_t *self)
Definition: m_tank.c:314
tank_move_pain3
mmove_t tank_move_pain3
Definition: m_tank.c:269
tank_move_attack_fire_rocket
mmove_t tank_move_attack_fire_rocket
Definition: m_tank.c:543
FRAME_attak101
#define FRAME_attak101
Definition: m_boss31.h:22
tank_move_stand
mmove_t tank_move_stand
Definition: m_tank.c:110
tank_move_pain2
mmove_t tank_move_pain2
Definition: m_tank.c:249