vkQuake2 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 792 of file m_tank.c.

793 {
794  if (deathmatch->value)
795  {
796  G_FreeEdict (self);
797  return;
798  }
799 
800  self->s.modelindex = gi.modelindex ("models/monsters/tank/tris.md2");
801  VectorSet (self->mins, -32, -32, -16);
802  VectorSet (self->maxs, 32, 32, 72);
803  self->movetype = MOVETYPE_STEP;
804  self->solid = SOLID_BBOX;
805 
806  sound_pain = gi.soundindex ("tank/tnkpain2.wav");
807  sound_thud = gi.soundindex ("tank/tnkdeth2.wav");
808  sound_idle = gi.soundindex ("tank/tnkidle1.wav");
809  sound_die = gi.soundindex ("tank/death.wav");
810  sound_step = gi.soundindex ("tank/step.wav");
811  sound_windup = gi.soundindex ("tank/tnkatck4.wav");
812  sound_strike = gi.soundindex ("tank/tnkatck5.wav");
813  sound_sight = gi.soundindex ("tank/sight1.wav");
814 
815  gi.soundindex ("tank/tnkatck1.wav");
816  gi.soundindex ("tank/tnkatk2a.wav");
817  gi.soundindex ("tank/tnkatk2b.wav");
818  gi.soundindex ("tank/tnkatk2c.wav");
819  gi.soundindex ("tank/tnkatk2d.wav");
820  gi.soundindex ("tank/tnkatk2e.wav");
821  gi.soundindex ("tank/tnkatck3.wav");
822 
823  if (strcmp(self->classname, "monster_tank_commander") == 0)
824  {
825  self->health = 1000;
826  self->gib_health = -225;
827  }
828  else
829  {
830  self->health = 750;
831  self->gib_health = -200;
832  }
833 
834  self->mass = 500;
835 
836  self->pain = tank_pain;
837  self->die = tank_die;
838  self->monsterinfo.stand = tank_stand;
839  self->monsterinfo.walk = tank_walk;
840  self->monsterinfo.run = tank_run;
841  self->monsterinfo.dodge = NULL;
842  self->monsterinfo.attack = tank_attack;
843  self->monsterinfo.melee = NULL;
844  self->monsterinfo.sight = tank_sight;
845  self->monsterinfo.idle = tank_idle;
846 
847  gi.linkentity (self);
848 
849  self->monsterinfo.currentmove = &tank_move_stand;
850  self->monsterinfo.scale = MODEL_SCALE;
851 
852  walkmonster_start(self);
853 
854  if (strcmp(self->classname, "monster_tank_commander") == 0)
855  self->s.skinnum = 2;
856 }

◆ tank_attack()

void tank_attack ( edict_t self)

Definition at line 655 of file m_tank.c.

656 {
657  vec3_t vec;
658  float range;
659  float r;
660 
661  if (self->enemy->health < 0)
662  {
663  self->monsterinfo.currentmove = &tank_move_attack_strike;
664  self->monsterinfo.aiflags &= ~AI_BRUTAL;
665  return;
666  }
667 
668  VectorSubtract (self->enemy->s.origin, self->s.origin, vec);
669  range = VectorLength (vec);
670 
671  r = random();
672 
673  if (range <= 125)
674  {
675  if (r < 0.4)
676  self->monsterinfo.currentmove = &tank_move_attack_chain;
677  else
678  self->monsterinfo.currentmove = &tank_move_attack_blast;
679  }
680  else if (range <= 250)
681  {
682  if (r < 0.5)
683  self->monsterinfo.currentmove = &tank_move_attack_chain;
684  else
685  self->monsterinfo.currentmove = &tank_move_attack_blast;
686  }
687  else
688  {
689  if (r < 0.33)
690  self->monsterinfo.currentmove = &tank_move_attack_chain;
691  else if (r < 0.66)
692  {
693  self->monsterinfo.currentmove = &tank_move_attack_pre_rocket;
694  self->pain_debounce_time = level.time + 5.0; // no pain for a while
695  }
696  else
697  self->monsterinfo.currentmove = &tank_move_attack_blast;
698  }
699 }

Referenced by SP_monster_tank().

◆ tank_dead()

void tank_dead ( edict_t self)

Definition at line 706 of file m_tank.c.

707 {
708  VectorSet (self->mins, -16, -16, -16);
709  VectorSet (self->maxs, 16, 16, -0);
710  self->movetype = MOVETYPE_TOSS;
711  self->svflags |= SVF_DEADMONSTER;
712  self->nextthink = 0;
713  gi.linkentity (self);
714 }

◆ tank_die()

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

Definition at line 753 of file m_tank.c.

754 {
755  int n;
756 
757 // check for gib
758  if (self->health <= self->gib_health)
759  {
760  gi.sound (self, CHAN_VOICE, gi.soundindex ("misc/udeath.wav"), 1, ATTN_NORM, 0);
761  for (n= 0; n < 1 /*4*/; n++)
762  ThrowGib (self, "models/objects/gibs/sm_meat/tris.md2", damage, GIB_ORGANIC);
763  for (n= 0; n < 4; n++)
764  ThrowGib (self, "models/objects/gibs/sm_metal/tris.md2", damage, GIB_METALLIC);
765  ThrowGib (self, "models/objects/gibs/chest/tris.md2", damage, GIB_ORGANIC);
766  ThrowHead (self, "models/objects/gibs/gear/tris.md2", damage, GIB_METALLIC);
767  self->deadflag = DEAD_DEAD;
768  return;
769  }
770 
771  if (self->deadflag == DEAD_DEAD)
772  return;
773 
774 // regular death
775  gi.sound (self, CHAN_VOICE, sound_die, 1, ATTN_NORM, 0);
776  self->deadflag = DEAD_DEAD;
777  self->takedamage = DAMAGE_YES;
778 
779  self->monsterinfo.currentmove = &tank_move_death;
780 
781 }

Referenced by SP_monster_tank().

◆ tank_doattack_rocket()

void tank_doattack_rocket ( edict_t self)

Definition at line 650 of file m_tank.c.

651 {
652  self->monsterinfo.currentmove = &tank_move_attack_fire_rocket;
653 }

◆ tank_footstep()

void tank_footstep ( edict_t self)

Definition at line 55 of file m_tank.c.

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

◆ tank_idle()

void tank_idle ( edict_t self)

Definition at line 70 of file m_tank.c.

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

Referenced by SP_monster_tank().

◆ tank_pain()

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

Definition at line 288 of file m_tank.c.

289 {
290  if (self->health < (self->max_health / 2))
291  self->s.skinnum |= 1;
292 
293  if (damage <= 10)
294  return;
295 
296  if (level.time < self->pain_debounce_time)
297  return;
298 
299  if (damage <= 30)
300  if (random() > 0.2)
301  return;
302 
303  // If hard or nightmare, don't go into pain while attacking
304  if ( skill->value >= 2)
305  {
306  if ( (self->s.frame >= FRAME_attak301) && (self->s.frame <= FRAME_attak330) )
307  return;
308  if ( (self->s.frame >= FRAME_attak101) && (self->s.frame <= FRAME_attak116) )
309  return;
310  }
311 
312  self->pain_debounce_time = level.time + 3;
313  gi.sound (self, CHAN_VOICE, sound_pain, 1, ATTN_NORM, 0);
314 
315  if (skill->value == 3)
316  return; // no pain anims in nightmare
317 
318  if (damage <= 30)
319  self->monsterinfo.currentmove = &tank_move_pain1;
320  else if (damage <= 60)
321  self->monsterinfo.currentmove = &tank_move_pain2;
322  else
323  self->monsterinfo.currentmove = &tank_move_pain3;
324 };

Referenced by SP_monster_tank().

◆ tank_poststrike()

void tank_poststrike ( edict_t self)

Definition at line 481 of file m_tank.c.

482 {
483  self->enemy = NULL;
484  tank_run (self);
485 }

◆ tank_reattack_blaster()

void tank_reattack_blaster ( edict_t self)

Definition at line 467 of file m_tank.c.

468 {
469  if (skill->value >= 2)
470  if (visible (self, self->enemy))
471  if (self->enemy->health > 0)
472  if (random() <= 0.6)
473  {
474  self->monsterinfo.currentmove = &tank_move_reattack_blast;
475  return;
476  }
477  self->monsterinfo.currentmove = &tank_move_attack_post_blast;
478 }

◆ tank_refire_rocket()

void tank_refire_rocket ( edict_t self)

Definition at line 636 of file m_tank.c.

637 {
638  // Only on hard or nightmare
639  if ( skill->value >= 2 )
640  if (self->enemy->health > 0)
641  if (visible(self, self->enemy) )
642  if (random() <= 0.4)
643  {
644  self->monsterinfo.currentmove = &tank_move_attack_fire_rocket;
645  return;
646  }
647  self->monsterinfo.currentmove = &tank_move_attack_post_rocket;
648 }

◆ tank_run()

void tank_run ( edict_t self)

Definition at line 219 of file m_tank.c.

220 {
221  if (self->enemy && self->enemy->client)
222  self->monsterinfo.aiflags |= AI_BRUTAL;
223  else
224  self->monsterinfo.aiflags &= ~AI_BRUTAL;
225 
226  if (self->monsterinfo.aiflags & AI_STAND_GROUND)
227  {
228  self->monsterinfo.currentmove = &tank_move_stand;
229  return;
230  }
231 
232  if (self->monsterinfo.currentmove == &tank_move_walk ||
234  {
235  self->monsterinfo.currentmove = &tank_move_run;
236  }
237  else
238  {
239  self->monsterinfo.currentmove = &tank_move_start_run;
240  }
241 }

Referenced by SP_monster_tank(), and tank_poststrike().

◆ tank_sight()

void tank_sight ( edict_t self,
edict_t other 
)

Definition at line 49 of file m_tank.c.

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

Referenced by SP_monster_tank().

◆ tank_stand()

void tank_stand ( edict_t self)

Definition at line 115 of file m_tank.c.

116 {
117  self->monsterinfo.currentmove = &tank_move_stand;
118 }

Referenced by SP_monster_tank().

◆ tank_thud()

void tank_thud ( edict_t self)

Definition at line 60 of file m_tank.c.

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

◆ tank_walk()

void tank_walk ( edict_t self)

Definition at line 167 of file m_tank.c.

168 {
169  self->monsterinfo.currentmove = &tank_move_walk;
170 }

Referenced by SP_monster_tank().

◆ tank_windup()

void tank_windup ( edict_t self)

Definition at line 65 of file m_tank.c.

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

◆ TankBlaster()

void TankBlaster ( edict_t self)

Definition at line 331 of file m_tank.c.

332 {
334  vec3_t start;
335  vec3_t end;
336  vec3_t dir;
337  int flash_number;
338 
339  if (self->s.frame == FRAME_attak110)
340  flash_number = MZ2_TANK_BLASTER_1;
341  else if (self->s.frame == FRAME_attak113)
342  flash_number = MZ2_TANK_BLASTER_2;
343  else // (self->s.frame == FRAME_attak116)
344  flash_number = MZ2_TANK_BLASTER_3;
345 
346  AngleVectors (self->s.angles, forward, right, NULL);
347  G_ProjectSource (self->s.origin, monster_flash_offset[flash_number], forward, right, start);
348 
349  VectorCopy (self->enemy->s.origin, end);
350  end[2] += self->enemy->viewheight;
351  VectorSubtract (end, start, dir);
352 
353  monster_fire_blaster (self, start, dir, 30, 800, flash_number, EF_BLASTER);
354 }

◆ TankMachineGun()

void TankMachineGun ( edict_t self)

Definition at line 387 of file m_tank.c.

388 {
389  vec3_t dir;
390  vec3_t vec;
391  vec3_t start;
393  int flash_number;
394 
395  flash_number = MZ2_TANK_MACHINEGUN_1 + (self->s.frame - FRAME_attak406);
396 
397  AngleVectors (self->s.angles, forward, right, NULL);
398  G_ProjectSource (self->s.origin, monster_flash_offset[flash_number], forward, right, start);
399 
400  if (self->enemy)
401  {
402  VectorCopy (self->enemy->s.origin, vec);
403  vec[2] += self->enemy->viewheight;
404  VectorSubtract (vec, start, vec);
405  vectoangles (vec, vec);
406  dir[0] = vec[0];
407  }
408  else
409  {
410  dir[0] = 0;
411  }
412  if (self->s.frame <= FRAME_attak415)
413  dir[1] = self->s.angles[1] - 8 * (self->s.frame - FRAME_attak411);
414  else
415  dir[1] = self->s.angles[1] + 8 * (self->s.frame - FRAME_attak419);
416  dir[2] = 0;
417 
418  AngleVectors (dir, forward, NULL, NULL);
419 
420  monster_fire_bullet (self, start, forward, 20, 4, DEFAULT_BULLET_HSPREAD, DEFAULT_BULLET_VSPREAD, flash_number);
421 }

◆ TankRocket()

void TankRocket ( edict_t self)

Definition at line 361 of file m_tank.c.

362 {
364  vec3_t start;
365  vec3_t dir;
366  vec3_t vec;
367  int flash_number;
368 
369  if (self->s.frame == FRAME_attak324)
370  flash_number = MZ2_TANK_ROCKET_1;
371  else if (self->s.frame == FRAME_attak327)
372  flash_number = MZ2_TANK_ROCKET_2;
373  else // (self->s.frame == FRAME_attak330)
374  flash_number = MZ2_TANK_ROCKET_3;
375 
376  AngleVectors (self->s.angles, forward, right, NULL);
377  G_ProjectSource (self->s.origin, monster_flash_offset[flash_number], forward, right, start);
378 
379  VectorCopy (self->enemy->s.origin, vec);
380  vec[2] += self->enemy->viewheight;
381  VectorSubtract (vec, start, dir);
382  VectorNormalize (dir);
383 
384  monster_fire_rocket (self, start, dir, 50, 550, flash_number);
385 }

◆ TankStrike()

void TankStrike ( edict_t self)

Definition at line 356 of file m_tank.c.

357 {
358  gi.sound (self, CHAN_WEAPON, sound_strike, 1, ATTN_NORM, 0);
359 }

Variable Documentation

◆ sound_die

int sound_die
static

Definition at line 39 of file m_tank.c.

Referenced by SP_monster_tank(), and tank_die().

◆ sound_idle

int sound_idle
static

Definition at line 38 of file m_tank.c.

Referenced by SP_monster_tank(), and tank_idle().

◆ sound_pain

int sound_pain
static

Definition at line 37 of file m_tank.c.

Referenced by SP_monster_tank(), and tank_pain().

◆ sound_sight

int sound_sight
static

Definition at line 41 of file m_tank.c.

Referenced by SP_monster_tank(), and tank_sight().

◆ sound_step

int sound_step
static

Definition at line 40 of file m_tank.c.

Referenced by SP_monster_tank(), and tank_footstep().

◆ sound_strike

int sound_strike
static

Definition at line 43 of file m_tank.c.

Referenced by SP_monster_tank(), and TankStrike().

◆ sound_thud

int sound_thud
static

Definition at line 36 of file m_tank.c.

Referenced by SP_monster_tank(), and tank_thud().

◆ sound_windup

int sound_windup
static

Definition at line 42 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:

Definition at line 424 of file m_tank.c.

◆ tank_frames_attack_chain

mframe_t tank_frames_attack_chain[]

Definition at line 602 of file m_tank.c.

◆ tank_frames_attack_fire_rocket

mframe_t tank_frames_attack_fire_rocket[]
Initial value:

Definition at line 558 of file m_tank.c.

◆ tank_frames_attack_post_blast

mframe_t tank_frames_attack_post_blast[]
Initial value:

Definition at line 456 of file m_tank.c.

◆ tank_frames_attack_post_rocket

mframe_t tank_frames_attack_post_rocket[]
Initial value:

Definition at line 572 of file m_tank.c.

◆ tank_frames_attack_pre_rocket

mframe_t tank_frames_attack_pre_rocket[]
Initial value:

Definition at line 530 of file m_tank.c.

◆ tank_frames_attack_strike

mframe_t tank_frames_attack_strike[]

Definition at line 487 of file m_tank.c.

◆ tank_frames_death1

mframe_t tank_frames_death1[]

Definition at line 716 of file m_tank.c.

◆ tank_frames_pain1

mframe_t tank_frames_pain1[]
Initial value:
=
{
}

Definition at line 247 of file m_tank.c.

◆ tank_frames_pain2

mframe_t tank_frames_pain2[]
Initial value:
=
{
}

Definition at line 256 of file m_tank.c.

◆ tank_frames_pain3

mframe_t tank_frames_pain3[]
Initial value:

Definition at line 266 of file m_tank.c.

◆ tank_frames_reattack_blast

mframe_t tank_frames_reattack_blast[]
Initial value:

Definition at line 445 of file m_tank.c.

◆ tank_frames_run

mframe_t tank_frames_run[]
Initial value:

Definition at line 188 of file m_tank.c.

◆ tank_frames_stand

mframe_t tank_frames_stand[]

Definition at line 80 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 179 of file m_tank.c.

◆ tank_frames_start_walk

mframe_t tank_frames_start_walk[]
Initial value:

Definition at line 127 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 209 of file m_tank.c.

◆ tank_frames_stop_walk

mframe_t tank_frames_stop_walk[]
Initial value:

Definition at line 157 of file m_tank.c.

◆ tank_frames_walk

mframe_t tank_frames_walk[]
Initial value:

Definition at line 136 of file m_tank.c.

◆ tank_move_attack_blast

Definition at line 443 of file m_tank.c.

Referenced by tank_attack().

◆ tank_move_attack_chain

Definition at line 634 of file m_tank.c.

Referenced by tank_attack().

◆ tank_move_attack_fire_rocket

Definition at line 570 of file m_tank.c.

Referenced by tank_doattack_rocket(), and tank_refire_rocket().

◆ tank_move_attack_post_blast

Definition at line 465 of file m_tank.c.

Referenced by tank_reattack_blaster().

◆ tank_move_attack_post_rocket

Definition at line 600 of file m_tank.c.

Referenced by tank_refire_rocket().

◆ tank_move_attack_pre_rocket

Definition at line 556 of file m_tank.c.

Referenced by tank_attack().

◆ tank_move_attack_strike

Definition at line 528 of file m_tank.c.

Referenced by tank_attack().

◆ tank_move_death

Definition at line 751 of file m_tank.c.

Referenced by tank_die().

◆ tank_move_pain1

Definition at line 254 of file m_tank.c.

Referenced by tank_pain().

◆ tank_move_pain2

Definition at line 264 of file m_tank.c.

Referenced by tank_pain().

◆ tank_move_pain3

Definition at line 285 of file m_tank.c.

Referenced by tank_pain().

◆ tank_move_reattack_blast

Definition at line 454 of file m_tank.c.

Referenced by tank_reattack_blaster().

◆ tank_move_run

Definition at line 207 of file m_tank.c.

Referenced by tank_run().

◆ tank_move_stand

Definition at line 113 of file m_tank.c.

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

◆ tank_move_start_run

Definition at line 186 of file m_tank.c.

Referenced by tank_run().

◆ tank_move_start_walk

Definition at line 134 of file m_tank.c.

◆ tank_move_stop_run

Definition at line 217 of file m_tank.c.

◆ tank_move_stop_walk

Definition at line 165 of file m_tank.c.

◆ tank_move_walk

Definition at line 155 of file m_tank.c.

Referenced by tank_run(), and tank_walk().

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
edict_s::s
entity_state_t s
Definition: g_local.h:970
deathmatch
cvar_t * deathmatch
Definition: g_main.c:35
tank_die
void tank_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: m_tank.c:753
tank_move_reattack_blast
mmove_t tank_move_reattack_blast
Definition: m_tank.c:454
DEAD_DEAD
#define DEAD_DEAD
Definition: g_local.h:115
AI_BRUTAL
#define AI_BRUTAL
Definition: g_local.h:138
tank_idle
void tank_idle(edict_t *self)
Definition: m_tank.c:70
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
tank_stand
void tank_stand(edict_t *self)
Definition: m_tank.c:115
entity_state_s::frame
int frame
Definition: q_shared.h:1154
MZ2_TANK_ROCKET_3
#define MZ2_TANK_ROCKET_3
Definition: q_shared.h:694
ai_charge
void ai_charge(edict_t *self, float dist)
Definition: g_ai.c:194
SOLID_BBOX
@ SOLID_BBOX
Definition: game.h:37
MZ2_TANK_BLASTER_2
#define MZ2_TANK_BLASTER_2
Definition: q_shared.h:671
sound_pain
static int sound_pain
Definition: m_tank.c:37
entity_state_s::origin
vec3_t origin
Definition: q_shared.h:1149
AI_STAND_GROUND
#define AI_STAND_GROUND
Definition: g_local.h:129
MODEL_SCALE
#define MODEL_SCALE
Definition: m_actor.h:506
edict_s::max_health
int max_health
Definition: g_local.h:1058
FRAME_attak419
#define FRAME_attak419
Definition: m_boss32.h:251
DAMAGE_YES
@ DAMAGE_YES
Definition: g_local.h:89
edict_s::client
struct gclient_s * client
Definition: g_local.h:971
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
MZ2_TANK_ROCKET_1
#define MZ2_TANK_ROCKET_1
Definition: q_shared.h:692
edict_s::mins
vec3_t mins
Definition: g_local.h:990
range
GLsizei range
Definition: qgl_win.c:121
monsterinfo_t::currentmove
mmove_t * currentmove
Definition: g_local.h:420
sound_sight
static int sound_sight
Definition: m_tank.c:41
ATTN_NORM
#define ATTN_NORM
Definition: q_shared.h:995
walkmonster_start
void walkmonster_start(edict_t *self)
Definition: g_monster.c:692
MOVETYPE_STEP
@ MOVETYPE_STEP
Definition: g_local.h:196
sound_idle
static int sound_idle
Definition: m_tank.c:38
tank_move_pain1
mmove_t tank_move_pain1
Definition: m_tank.c:254
sound_windup
static int sound_windup
Definition: m_tank.c:42
SVF_DEADMONSTER
#define SVF_DEADMONSTER
Definition: game.h:28
tank_move_attack_blast
mmove_t tank_move_attack_blast
Definition: m_tank.c:443
AngleVectors
void AngleVectors(vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
Definition: q_shared.c:93
MZ2_TANK_MACHINEGUN_1
#define MZ2_TANK_MACHINEGUN_1
Definition: q_shared.h:673
monster_flash_offset
vec3_t monster_flash_offset[]
Definition: m_flash.c:27
CHAN_VOICE
#define CHAN_VOICE
Definition: q_shared.h:985
FRAME_attak406
#define FRAME_attak406
Definition: m_boss32.h:238
tank_move_death
mmove_t tank_move_death
Definition: m_tank.c:751
vectoangles
void vectoangles(vec3_t vec, vec3_t angles)
Definition: g_utils.c:356
DEFAULT_BULLET_VSPREAD
#define DEFAULT_BULLET_VSPREAD
Definition: g_local.h:671
edict_s::classname
char * classname
Definition: g_local.h:1011
G_FreeEdict
void G_FreeEdict(edict_t *e)
Definition: g_utils.c:452
GIB_METALLIC
#define GIB_METALLIC
Definition: g_local.h:126
sound_thud
static int sound_thud
Definition: m_tank.c:36
r
GLdouble GLdouble r
Definition: qgl_win.c:336
TankRocket
void TankRocket(edict_t *self)
Definition: m_tank.c:361
FRAME_attak110
#define FRAME_attak110
Definition: m_boss31.h:33
game_import_t::soundindex
int(* soundindex)(char *name)
Definition: game.h:122
forward
static vec3_t forward
Definition: p_view.c:29
EF_BLASTER
#define EF_BLASTER
Definition: q_shared.h:564
VectorLength
vec_t VectorLength(vec3_t v)
Definition: q_shared.c:762
game_import_t::modelindex
int(* modelindex)(char *name)
Definition: game.h:121
edict_s::deadflag
int deadflag
Definition: g_local.h:1060
FRAME_attak301
#define FRAME_attak301
Definition: m_boss32.h:225
FRAME_attak116
#define FRAME_attak116
Definition: m_boss31.h:39
sound_step
static int sound_step
Definition: m_tank.c:40
FRAME_attak415
#define FRAME_attak415
Definition: m_boss32.h:247
tank_footstep
void tank_footstep(edict_t *self)
Definition: m_tank.c:55
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
FRAME_attak324
#define FRAME_attak324
Definition: m_float.h:117
VectorNormalize
vec_t VectorNormalize(vec3_t v)
Definition: q_shared.c:681
NULL
#define NULL
Definition: q_shared.h:67
tank_walk
void tank_walk(edict_t *self)
Definition: m_tank.c:167
monsterinfo_t::aiflags
int aiflags
Definition: g_local.h:421
FRAME_attak327
#define FRAME_attak327
Definition: m_float.h:120
sound_die
static int sound_die
Definition: m_tank.c:39
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
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:71
skill
cvar_t * skill
Definition: g_main.c:38
tank_move_attack_post_rocket
mmove_t tank_move_attack_post_rocket
Definition: m_tank.c:600
MZ2_TANK_ROCKET_2
#define MZ2_TANK_ROCKET_2
Definition: q_shared.h:693
tank_run
void tank_run(edict_t *self)
Definition: m_tank.c:219
ai_move
void ai_move(edict_t *self, float dist)
Definition: g_ai.c:92
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:51
MZ2_TANK_BLASTER_3
#define MZ2_TANK_BLASTER_3
Definition: q_shared.h:672
tank_move_attack_pre_rocket
mmove_t tank_move_attack_pre_rocket
Definition: m_tank.c:556
VectorCopy
#define VectorCopy(a, b)
Definition: q_shared.h:165
edict_s::pain_debounce_time
float pain_debounce_time
Definition: g_local.h:1052
sound_strike
static int sound_strike
Definition: m_tank.c:43
edict_s::monsterinfo
monsterinfo_t monsterinfo
Definition: g_local.h:1114
visible
qboolean visible(edict_t *self, edict_t *other)
Definition: g_ai.c:287
tank_move_attack_chain
mmove_t tank_move_attack_chain
Definition: m_tank.c:634
CHAN_WEAPON
#define CHAN_WEAPON
Definition: q_shared.h:984
tank_move_attack_strike
mmove_t tank_move_attack_strike
Definition: m_tank.c:528
tank_move_walk
mmove_t tank_move_walk
Definition: m_tank.c:155
level
GLint level
Definition: qgl_win.c:116
ai_run
void ai_run(edict_t *self, float dist)
Definition: g_ai.c:914
FRAME_attak411
#define FRAME_attak411
Definition: m_boss32.h:243
GIB_ORGANIC
#define GIB_ORGANIC
Definition: g_local.h:125
FRAME_attak330
#define FRAME_attak330
Definition: m_float.h:123
edict_s::maxs
vec3_t maxs
Definition: g_local.h:990
tank_pain
void tank_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: m_tank.c:288
tank_attack
void tank_attack(edict_t *self)
Definition: m_tank.c:655
ThrowHead
void ThrowHead(edict_t *self, char *gibname, int damage, int type)
Definition: g_misc.c:183
tank_sight
void tank_sight(edict_t *self, edict_t *other)
Definition: m_tank.c:49
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
tank_move_run
mmove_t tank_move_run
Definition: m_tank.c:207
tank_move_attack_post_blast
mmove_t tank_move_attack_post_blast
Definition: m_tank.c:465
tank_move_start_run
mmove_t tank_move_start_run
Definition: m_tank.c:186
CHAN_BODY
#define CHAN_BODY
Definition: q_shared.h:987
edict_s::enemy
edict_t * enemy
Definition: g_local.h:1076
game_import_t::linkentity
void(* linkentity)(edict_t *ent)
Definition: game.h:138
entity_state_s::angles
vec3_t angles
Definition: q_shared.h:1150
FRAME_attak113
#define FRAME_attak113
Definition: m_boss31.h:36
vec3_t
vec_t vec3_t[3]
Definition: q_shared.h:134
TankBlaster
void TankBlaster(edict_t *self)
Definition: m_tank.c:331
MZ2_TANK_BLASTER_1
#define MZ2_TANK_BLASTER_1
Definition: q_shared.h:670
tank_move_pain3
mmove_t tank_move_pain3
Definition: m_tank.c:285
tank_move_attack_fire_rocket
mmove_t tank_move_attack_fire_rocket
Definition: m_tank.c:570
FRAME_attak101
#define FRAME_attak101
Definition: m_boss31.h:24
tank_move_stand
mmove_t tank_move_stand
Definition: m_tank.c:113
edict_s::health
int health
Definition: g_local.h:1057
tank_move_pain2
mmove_t tank_move_pain2
Definition: m_tank.c:264