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

Go to the source code of this file.

Functions

void SP_monster_makron (edict_t *self)
 
qboolean visible (edict_t *self, edict_t *other)
 
void BossExplode (edict_t *self)
 
void MakronToss (edict_t *self)
 
void jorg_search (edict_t *self)
 
void jorg_dead (edict_t *self)
 
void jorgBFG (edict_t *self)
 
void jorgMachineGun (edict_t *self)
 
void jorg_firebullet (edict_t *self)
 
void jorg_reattack1 (edict_t *self)
 
void jorg_attack1 (edict_t *self)
 
void jorg_idle (edict_t *self)
 
void jorg_step_left (edict_t *self)
 
void jorg_step_right (edict_t *self)
 
void jorg_death_hit (edict_t *self)
 
void jorg_stand (edict_t *self)
 
void jorg_walk (edict_t *self)
 
void jorg_run (edict_t *self)
 
void jorg_pain (edict_t *self, edict_t *other, float kick, int damage)
 
void jorg_firebullet_right (edict_t *self)
 
void jorg_firebullet_left (edict_t *self)
 
void jorg_attack (edict_t *self)
 
void jorg_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
 
qboolean Jorg_CheckAttack (edict_t *self)
 
void MakronPrecache (void)
 
void SP_monster_jorg (edict_t *self)
 

Variables

static int sound_pain1
 
static int sound_pain2
 
static int sound_pain3
 
static int sound_idle
 
static int sound_death
 
static int sound_search1
 
static int sound_search2
 
static int sound_search3
 
static int sound_attack1
 
static int sound_attack2
 
static int sound_firegun
 
static int sound_step_left
 
static int sound_step_right
 
static int sound_death_hit
 
mframe_t jorg_frames_stand []
 
mmove_t jorg_move_stand = {FRAME_stand01, FRAME_stand51, jorg_frames_stand, NULL}
 
mframe_t jorg_frames_run []
 
mmove_t jorg_move_run = {FRAME_walk06, FRAME_walk19, jorg_frames_run, NULL}
 
mframe_t jorg_frames_start_walk []
 
mmove_t jorg_move_start_walk = {FRAME_walk01, FRAME_walk05, jorg_frames_start_walk, NULL}
 
mframe_t jorg_frames_walk []
 
mmove_t jorg_move_walk = {FRAME_walk06, FRAME_walk19, jorg_frames_walk, NULL}
 
mframe_t jorg_frames_end_walk []
 
mmove_t jorg_move_end_walk = {FRAME_walk20, FRAME_walk25, jorg_frames_end_walk, NULL}
 
mframe_t jorg_frames_pain3 []
 
mmove_t jorg_move_pain3 = {FRAME_pain301, FRAME_pain325, jorg_frames_pain3, jorg_run}
 
mframe_t jorg_frames_pain2 []
 
mmove_t jorg_move_pain2 = {FRAME_pain201, FRAME_pain203, jorg_frames_pain2, jorg_run}
 
mframe_t jorg_frames_pain1 []
 
mmove_t jorg_move_pain1 = {FRAME_pain101, FRAME_pain103, jorg_frames_pain1, jorg_run}
 
mframe_t jorg_frames_death1 []
 
mmove_t jorg_move_death = {FRAME_death01, FRAME_death50, jorg_frames_death1, jorg_dead}
 
mframe_t jorg_frames_attack2 []
 
mmove_t jorg_move_attack2 = {FRAME_attak201, FRAME_attak213, jorg_frames_attack2, jorg_run}
 
mframe_t jorg_frames_start_attack1 []
 
mmove_t jorg_move_start_attack1 = {FRAME_attak101, FRAME_attak108, jorg_frames_start_attack1, jorg_attack1}
 
mframe_t jorg_frames_attack1 []
 
mmove_t jorg_move_attack1 = {FRAME_attak109, FRAME_attak114, jorg_frames_attack1, jorg_reattack1}
 
mframe_t jorg_frames_end_attack1 []
 
mmove_t jorg_move_end_attack1 = {FRAME_attak115, FRAME_attak118, jorg_frames_end_attack1, jorg_run}
 

Function Documentation

◆ BossExplode()

void BossExplode ( edict_t *  self)

Definition at line 569 of file m_supertank.c.

570 {
571  vec3_t org;
572  int n;
573 
574  self->think = BossExplode;
575  VectorCopy(self->s.origin, org);
576  org[2] += 24 + (rand() & 15);
577  switch (self->count++) {
578  case 0:
579  org[0] -= 24;
580  org[1] -= 24;
581  break;
582  case 1:
583  org[0] += 24;
584  org[1] += 24;
585  break;
586  case 2:
587  org[0] += 24;
588  org[1] -= 24;
589  break;
590  case 3:
591  org[0] -= 24;
592  org[1] += 24;
593  break;
594  case 4:
595  org[0] -= 48;
596  org[1] -= 48;
597  break;
598  case 5:
599  org[0] += 48;
600  org[1] += 48;
601  break;
602  case 6:
603  org[0] -= 48;
604  org[1] += 48;
605  break;
606  case 7:
607  org[0] += 48;
608  org[1] -= 48;
609  break;
610  case 8:
611  self->s.sound = 0;
612  for (n = 0; n < 4; n++)
613  ThrowGib(self, "models/objects/gibs/sm_meat/tris.md2", 500, GIB_ORGANIC);
614  for (n = 0; n < 8; n++)
615  ThrowGib(self, "models/objects/gibs/sm_metal/tris.md2", 500, GIB_METALLIC);
616  ThrowGib(self, "models/objects/gibs/chest/tris.md2", 500, GIB_ORGANIC);
617  ThrowHead(self, "models/objects/gibs/gear/tris.md2", 500, GIB_METALLIC);
618  self->deadflag = DEAD_DEAD;
619  return;
620  }
621 
622  gi.WriteByte(svc_temp_entity);
623  gi.WriteByte(TE_EXPLOSION1);
624  gi.WritePosition(org);
625  gi.multicast(self->s.origin, MULTICAST_PVS);
626 
627  self->nextthink = level.time + 0.1;
628 }

◆ jorg_attack()

void jorg_attack ( edict_t *  self)

Definition at line 516 of file m_boss31.c.

517 {
518  if (random() <= 0.75) {
519  gi.sound(self, CHAN_VOICE, sound_attack1, 1, ATTN_NORM, 0);
520  self->s.sound = gi.soundindex("boss3/w_loop.wav");
521  self->monsterinfo.currentmove = &jorg_move_start_attack1;
522  } else {
523  gi.sound(self, CHAN_VOICE, sound_attack2, 1, ATTN_NORM, 0);
524  self->monsterinfo.currentmove = &jorg_move_attack2;
525  }
526 }

Referenced by SP_monster_jorg().

◆ jorg_attack1()

void jorg_attack1 ( edict_t *  self)

Definition at line 394 of file m_boss31.c.

395 {
396  self->monsterinfo.currentmove = &jorg_move_attack1;
397 }

◆ Jorg_CheckAttack()

qboolean Jorg_CheckAttack ( edict_t *  self)

Definition at line 567 of file m_boss31.c.

568 {
569  vec3_t spot1, spot2;
570  vec3_t temp;
571  float chance;
572  trace_t tr;
573  int enemy_range;
574  float enemy_yaw;
575 
576  if (self->enemy->health > 0) {
577  // see if any entities are in the way of the shot
578  VectorCopy(self->s.origin, spot1);
579  spot1[2] += self->viewheight;
580  VectorCopy(self->enemy->s.origin, spot2);
581  spot2[2] += self->enemy->viewheight;
582 
583  tr = gi.trace(spot1, NULL, NULL, spot2, self, CONTENTS_SOLID | CONTENTS_MONSTER | CONTENTS_SLIME | CONTENTS_LAVA);
584 
585  // do we have a clear shot?
586  if (tr.ent != self->enemy)
587  return qfalse;
588  }
589 
590  enemy_range = range(self, self->enemy);
591  VectorSubtract(self->enemy->s.origin, self->s.origin, temp);
592  enemy_yaw = vectoyaw(temp);
593 
594  self->ideal_yaw = enemy_yaw;
595 
596 
597  // melee attack
598  if (enemy_range == RANGE_MELEE) {
599  if (self->monsterinfo.melee)
600  self->monsterinfo.attack_state = AS_MELEE;
601  else
602  self->monsterinfo.attack_state = AS_MISSILE;
603  return qtrue;
604  }
605 
606 // missile attack
607  if (!self->monsterinfo.attack)
608  return qfalse;
609 
610  if (level.time < self->monsterinfo.attack_finished)
611  return qfalse;
612 
613  if (enemy_range == RANGE_FAR)
614  return qfalse;
615 
616  if (self->monsterinfo.aiflags & AI_STAND_GROUND) {
617  chance = 0.4;
618  } else if (enemy_range == RANGE_MELEE) {
619  chance = 0.8;
620  } else if (enemy_range == RANGE_NEAR) {
621  chance = 0.4;
622  } else if (enemy_range == RANGE_MID) {
623  chance = 0.2;
624  } else {
625  return qfalse;
626  }
627 
628  if (random() < chance) {
629  self->monsterinfo.attack_state = AS_MISSILE;
630  self->monsterinfo.attack_finished = level.time + 2 * random();
631  return qtrue;
632  }
633 
634  if (self->flags & FL_FLY) {
635  if (random() < 0.3)
636  self->monsterinfo.attack_state = AS_SLIDING;
637  else
638  self->monsterinfo.attack_state = AS_STRAIGHT;
639  }
640 
641  return qfalse;
642 }

Referenced by SP_monster_jorg().

◆ jorg_dead()

void jorg_dead ( edict_t *  self)

Definition at line 528 of file m_boss31.c.

529 {
530 #if 0
531  edict_t *tempent;
532  /*
533  VectorSet (self->mins, -16, -16, -24);
534  VectorSet (self->maxs, 16, 16, -8);
535  */
536 
537  // Jorg is on modelindex2. Do not clear him.
538  VectorSet(self->mins, -60, -60, 0);
539  VectorSet(self->maxs, 60, 60, 72);
540  self->movetype = MOVETYPE_TOSS;
541  self->nextthink = 0;
542  gi.linkentity(self);
543 
544  tempent = G_Spawn();
545  VectorCopy(self->s.origin, tempent->s.origin);
546  VectorCopy(self->s.angles, tempent->s.angles);
547  tempent->killtarget = self->killtarget;
548  tempent->target = self->target;
549  tempent->activator = self->enemy;
550  self->killtarget = 0;
551  self->target = 0;
552  SP_monster_makron(tempent);
553 #endif
554 }

◆ jorg_death_hit()

void jorg_death_hit ( edict_t *  self)

Definition at line 141 of file m_boss31.c.

142 {
143  gi.sound(self, CHAN_BODY, sound_death_hit, 1, ATTN_NORM, 0);
144 }

◆ jorg_die()

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

Definition at line 557 of file m_boss31.c.

558 {
559  gi.sound(self, CHAN_VOICE, sound_death, 1, ATTN_NORM, 0);
560  self->deadflag = DEAD_DEAD;
561  self->takedamage = DAMAGE_NO;
562  self->s.sound = 0;
563  self->count = 0;
564  self->monsterinfo.currentmove = &jorg_move_death;
565 }

Referenced by SP_monster_jorg().

◆ jorg_firebullet()

void jorg_firebullet ( edict_t *  self)

Definition at line 510 of file m_boss31.c.

511 {
512  jorg_firebullet_left(self);
513  jorg_firebullet_right(self);
514 }

◆ jorg_firebullet_left()

void jorg_firebullet_left ( edict_t *  self)

Definition at line 494 of file m_boss31.c.

495 {
496  vec3_t forward, right, target;
497  vec3_t start;
498 
499  AngleVectors(self->s.angles, forward, right, NULL);
500  G_ProjectSource(self->s.origin, monster_flash_offset[MZ2_JORG_MACHINEGUN_L1], forward, right, start);
501 
502  VectorMA(self->enemy->s.origin, -0.2, self->enemy->velocity, target);
503  target[2] += self->enemy->viewheight;
504  VectorSubtract(target, start, forward);
506 
507  monster_fire_bullet(self, start, forward, 6, 4, DEFAULT_BULLET_HSPREAD, DEFAULT_BULLET_VSPREAD, MZ2_JORG_MACHINEGUN_L1);
508 }

Referenced by jorg_firebullet().

◆ jorg_firebullet_right()

void jorg_firebullet_right ( edict_t *  self)

Definition at line 478 of file m_boss31.c.

479 {
480  vec3_t forward, right, target;
481  vec3_t start;
482 
483  AngleVectors(self->s.angles, forward, right, NULL);
484  G_ProjectSource(self->s.origin, monster_flash_offset[MZ2_JORG_MACHINEGUN_R1], forward, right, start);
485 
486  VectorMA(self->enemy->s.origin, -0.2, self->enemy->velocity, target);
487  target[2] += self->enemy->viewheight;
488  VectorSubtract(target, start, forward);
490 
491  monster_fire_bullet(self, start, forward, 6, 4, DEFAULT_BULLET_HSPREAD, DEFAULT_BULLET_VSPREAD, MZ2_JORG_MACHINEGUN_R1);
492 }

Referenced by jorg_firebullet().

◆ jorg_idle()

void jorg_idle ( edict_t *  self)

Definition at line 136 of file m_boss31.c.

137 {
138  gi.sound(self, CHAN_VOICE, sound_idle, 1, ATTN_NORM, 0);
139 }

◆ jorg_pain()

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

Definition at line 399 of file m_boss31.c.

400 {
401 
402  if (self->health < (self->max_health / 2))
403  self->s.skinnum = 1;
404 
405  self->s.sound = 0;
406 
407  if (level.time < self->pain_debounce_time)
408  return;
409 
410  // Lessen the chance of him going into his pain frames if he takes little damage
411  if (damage <= 40)
412  if (random() <= 0.6)
413  return;
414 
415  /*
416  If he's entering his attack1 or using attack1, lessen the chance of him
417  going into pain
418  */
419 
420  if ((self->s.frame >= FRAME_attak101) && (self->s.frame <= FRAME_attak108))
421  if (random() <= 0.005)
422  return;
423 
424  if ((self->s.frame >= FRAME_attak109) && (self->s.frame <= FRAME_attak114))
425  if (random() <= 0.00005)
426  return;
427 
428 
429  if ((self->s.frame >= FRAME_attak201) && (self->s.frame <= FRAME_attak208))
430  if (random() <= 0.005)
431  return;
432 
433 
434  self->pain_debounce_time = level.time + 3;
435  if (skill->value == 3)
436  return; // no pain anims in nightmare
437 
438  if (damage <= 50) {
439  gi.sound(self, CHAN_VOICE, sound_pain1, 1, ATTN_NORM, 0);
440  self->monsterinfo.currentmove = &jorg_move_pain1;
441  } else if (damage <= 100) {
442  gi.sound(self, CHAN_VOICE, sound_pain2, 1, ATTN_NORM, 0);
443  self->monsterinfo.currentmove = &jorg_move_pain2;
444  } else {
445  if (random() <= 0.3) {
446  gi.sound(self, CHAN_VOICE, sound_pain3, 1, ATTN_NORM, 0);
447  self->monsterinfo.currentmove = &jorg_move_pain3;
448  }
449  }
450 }

Referenced by SP_monster_jorg().

◆ jorg_reattack1()

void jorg_reattack1 ( edict_t *  self)

Definition at line 379 of file m_boss31.c.

380 {
381  if (visible(self, self->enemy))
382  if (random() < 0.9)
383  self->monsterinfo.currentmove = &jorg_move_attack1;
384  else {
385  self->s.sound = 0;
386  self->monsterinfo.currentmove = &jorg_move_end_attack1;
387  }
388  else {
389  self->s.sound = 0;
390  self->monsterinfo.currentmove = &jorg_move_end_attack1;
391  }
392 }

◆ jorg_run()

void jorg_run ( edict_t *  self)

Definition at line 227 of file m_boss31.c.

228 {
229  if (self->monsterinfo.aiflags & AI_STAND_GROUND)
230  self->monsterinfo.currentmove = &jorg_move_stand;
231  else
232  self->monsterinfo.currentmove = &jorg_move_run;
233 }

Referenced by SP_monster_jorg().

◆ jorg_search()

void jorg_search ( edict_t *  self)

Definition at line 51 of file m_boss31.c.

52 {
53  float r;
54 
55  r = random();
56 
57  if (r <= 0.3)
58  gi.sound(self, CHAN_VOICE, sound_search1, 1, ATTN_NORM, 0);
59  else if (r <= 0.6)
60  gi.sound(self, CHAN_VOICE, sound_search2, 1, ATTN_NORM, 0);
61  else
62  gi.sound(self, CHAN_VOICE, sound_search3, 1, ATTN_NORM, 0);
63 }

Referenced by SP_monster_jorg().

◆ jorg_stand()

void jorg_stand ( edict_t *  self)

Definition at line 158 of file m_boss31.c.

159 {
160  self->monsterinfo.currentmove = &jorg_move_stand;
161 }

Referenced by SP_monster_jorg().

◆ jorg_step_left()

void jorg_step_left ( edict_t *  self)

Definition at line 147 of file m_boss31.c.

148 {
149  gi.sound(self, CHAN_BODY, sound_step_left, 1, ATTN_NORM, 0);
150 }

◆ jorg_step_right()

void jorg_step_right ( edict_t *  self)

Definition at line 152 of file m_boss31.c.

153 {
154  gi.sound(self, CHAN_BODY, sound_step_right, 1, ATTN_NORM, 0);
155 }

◆ jorg_walk()

void jorg_walk ( edict_t *  self)

Definition at line 222 of file m_boss31.c.

223 {
224  self->monsterinfo.currentmove = &jorg_move_walk;
225 }

Referenced by SP_monster_jorg().

◆ jorgBFG()

void jorgBFG ( edict_t *  self)

Definition at line 452 of file m_boss31.c.

453 {
454  vec3_t forward, right;
455  vec3_t start;
456  vec3_t dir;
457  vec3_t vec;
458 
459  AngleVectors(self->s.angles, forward, right, NULL);
460  G_ProjectSource(self->s.origin, monster_flash_offset[MZ2_JORG_BFG_1], forward, right, start);
461 
462  VectorCopy(self->enemy->s.origin, vec);
463  vec[2] += self->enemy->viewheight;
464  VectorSubtract(vec, start, dir);
465  VectorNormalize(dir);
466  gi.sound(self, CHAN_VOICE, sound_attack2, 1, ATTN_NORM, 0);
467  /*void monster_fire_bfg (edict_t *self,
468  vec3_t start,
469  vec3_t aimdir,
470  int damage,
471  int speed,
472  int kick,
473  float damage_radius,
474  int flashtype)*/
475  monster_fire_bfg(self, start, dir, 50, 300, 100, 200, MZ2_JORG_BFG_1);
476 }

◆ jorgMachineGun()

void jorgMachineGun ( edict_t *  self)

◆ MakronPrecache()

void MakronPrecache ( void  )

Definition at line 762 of file m_boss32.c.

763 {
764  sound_pain4 = gi.soundindex("makron/pain3.wav");
765  sound_pain5 = gi.soundindex("makron/pain2.wav");
766  sound_pain6 = gi.soundindex("makron/pain1.wav");
767  sound_death = gi.soundindex("makron/death.wav");
768  sound_step_left = gi.soundindex("makron/step1.wav");
769  sound_step_right = gi.soundindex("makron/step2.wav");
770  sound_attack_bfg = gi.soundindex("makron/bfg_fire.wav");
771  sound_brainsplorch = gi.soundindex("makron/brain1.wav");
772  sound_prerailgun = gi.soundindex("makron/rail_up.wav");
773  sound_popup = gi.soundindex("makron/popup.wav");
774  sound_taunt1 = gi.soundindex("makron/voice4.wav");
775  sound_taunt2 = gi.soundindex("makron/voice3.wav");
776  sound_taunt3 = gi.soundindex("makron/voice.wav");
777  sound_hit = gi.soundindex("makron/bhit.wav");
778 
779  gi.modelindex("models/monsters/boss3/rider/tris.md2");
780 }

Referenced by SP_monster_jorg(), and SP_monster_makron().

◆ MakronToss()

void MakronToss ( edict_t *  self)

Definition at line 857 of file m_boss32.c.

858 {
859  edict_t *ent;
860 
861  ent = G_Spawn();
862  ent->nextthink = level.time + 0.8;
863  ent->think = MakronSpawn;
864  ent->target = self->target;
865  VectorCopy(self->s.origin, ent->s.origin);
866 }

◆ SP_monster_jorg()

void SP_monster_jorg ( edict_t *  self)

Definition at line 649 of file m_boss31.c.

650 {
651  if (deathmatch->value) {
652  G_FreeEdict(self);
653  return;
654  }
655 
656  sound_pain1 = gi.soundindex("boss3/bs3pain1.wav");
657  sound_pain2 = gi.soundindex("boss3/bs3pain2.wav");
658  sound_pain3 = gi.soundindex("boss3/bs3pain3.wav");
659  sound_death = gi.soundindex("boss3/bs3deth1.wav");
660  sound_attack1 = gi.soundindex("boss3/bs3atck1.wav");
661  sound_attack2 = gi.soundindex("boss3/bs3atck2.wav");
662  sound_search1 = gi.soundindex("boss3/bs3srch1.wav");
663  sound_search2 = gi.soundindex("boss3/bs3srch2.wav");
664  sound_search3 = gi.soundindex("boss3/bs3srch3.wav");
665  sound_idle = gi.soundindex("boss3/bs3idle1.wav");
666  sound_step_left = gi.soundindex("boss3/step1.wav");
667  sound_step_right = gi.soundindex("boss3/step2.wav");
668  sound_firegun = gi.soundindex("boss3/xfire.wav");
669  sound_death_hit = gi.soundindex("boss3/d_hit.wav");
670 
671  MakronPrecache();
672 
673  self->movetype = MOVETYPE_STEP;
674  self->solid = SOLID_BBOX;
675  self->s.modelindex = gi.modelindex("models/monsters/boss3/rider/tris.md2");
676  self->s.modelindex2 = gi.modelindex("models/monsters/boss3/jorg/tris.md2");
677  VectorSet(self->mins, -80, -80, 0);
678  VectorSet(self->maxs, 80, 80, 140);
679 
680  self->health = 3000;
681  self->gib_health = -2000;
682  self->mass = 1000;
683 
684  self->pain = jorg_pain;
685  self->die = jorg_die;
686  self->monsterinfo.stand = jorg_stand;
687  self->monsterinfo.walk = jorg_walk;
688  self->monsterinfo.run = jorg_run;
689  self->monsterinfo.dodge = NULL;
690  self->monsterinfo.attack = jorg_attack;
691  self->monsterinfo.search = jorg_search;
692  self->monsterinfo.melee = NULL;
693  self->monsterinfo.sight = NULL;
694  self->monsterinfo.checkattack = Jorg_CheckAttack;
695  gi.linkentity(self);
696 
697  self->monsterinfo.currentmove = &jorg_move_stand;
698  self->monsterinfo.scale = MODEL_SCALE;
699 
700  walkmonster_start(self);
701 }

◆ SP_monster_makron()

void SP_monster_makron ( edict_t *  self)

Definition at line 784 of file m_boss32.c.

785 {
786  if (deathmatch->value) {
787  G_FreeEdict(self);
788  return;
789  }
790 
791  MakronPrecache();
792 
793  self->movetype = MOVETYPE_STEP;
794  self->solid = SOLID_BBOX;
795  self->s.modelindex = gi.modelindex("models/monsters/boss3/rider/tris.md2");
796  VectorSet(self->mins, -30, -30, 0);
797  VectorSet(self->maxs, 30, 30, 90);
798 
799  self->health = 3000;
800  self->gib_health = -2000;
801  self->mass = 500;
802 
803  self->pain = makron_pain;
804  self->die = makron_die;
805  self->monsterinfo.stand = makron_stand;
806  self->monsterinfo.walk = makron_walk;
807  self->monsterinfo.run = makron_run;
808  self->monsterinfo.dodge = NULL;
809  self->monsterinfo.attack = makron_attack;
810  self->monsterinfo.melee = NULL;
811  self->monsterinfo.sight = makron_sight;
812  self->monsterinfo.checkattack = Makron_CheckAttack;
813 
814  gi.linkentity(self);
815 
816 // self->monsterinfo.currentmove = &makron_move_stand;
817  self->monsterinfo.currentmove = &makron_move_sight;
818  self->monsterinfo.scale = MODEL_SCALE;
819 
820  walkmonster_start(self);
821 }

Referenced by jorg_dead(), and MakronSpawn().

◆ 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 jorg_reattack1().

Variable Documentation

◆ jorg_frames_attack1

mframe_t jorg_frames_attack1[]
Initial value:

Definition at line 361 of file m_boss31.c.

◆ jorg_frames_attack2

mframe_t jorg_frames_attack2[]
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, jorgBFG },
{ ai_move, 0, NULL },
{ ai_move, 0, NULL },
{ ai_move, 0, NULL },
{ ai_move, 0, NULL },
{ ai_move, 0, NULL },
{ ai_move, 0, NULL }
}

Definition at line 332 of file m_boss31.c.

◆ jorg_frames_death1

mframe_t jorg_frames_death1[]

Definition at line 278 of file m_boss31.c.

◆ jorg_frames_end_attack1

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

Definition at line 371 of file m_boss31.c.

◆ jorg_frames_end_walk

mframe_t jorg_frames_end_walk[]
Initial value:
= {
{ ai_walk, 11, NULL },
{ ai_walk, 0, NULL },
{ ai_walk, 0, NULL },
{ ai_walk, 0, NULL },
{ ai_walk, 8, NULL },
{ ai_walk, -8, NULL }
}

Definition at line 212 of file m_boss31.c.

◆ jorg_frames_pain1

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

Definition at line 271 of file m_boss31.c.

◆ jorg_frames_pain2

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

Definition at line 264 of file m_boss31.c.

◆ jorg_frames_pain3

mframe_t jorg_frames_pain3[]
Initial value:
= {
{ ai_move, -28, NULL },
{ ai_move, -6, NULL },
{ ai_move, -9, NULL },
{ ai_move, 0, NULL },
{ ai_move, 0, NULL },
{ ai_move, 0, NULL },
{ ai_move, -7, NULL },
{ ai_move, 1, NULL },
{ ai_move, -11, NULL },
{ ai_move, -4, NULL },
{ ai_move, 0, NULL },
{ ai_move, 0, NULL },
{ ai_move, 10, NULL },
{ ai_move, 11, NULL },
{ ai_move, 0, NULL },
{ ai_move, 10, NULL },
{ ai_move, 3, NULL },
{ ai_move, 10, NULL },
{ ai_move, 17, NULL },
{ ai_move, 0, NULL },
{ ai_move, 0, NULL },
}

Definition at line 235 of file m_boss31.c.

◆ jorg_frames_run

mframe_t jorg_frames_run[]
Initial value:
= {
{ ai_run, 0, NULL },
{ ai_run, 0, NULL },
{ ai_run, 0, NULL },
{ ai_run, 12, NULL },
{ ai_run, 8, NULL },
{ ai_run, 10, NULL },
{ ai_run, 0, NULL },
{ ai_run, 0, NULL },
{ ai_run, 0, NULL },
{ ai_run, 9, NULL },
{ ai_run, 9, NULL },
{ ai_run, 9, NULL }
}

Definition at line 163 of file m_boss31.c.

◆ jorg_frames_stand

mframe_t jorg_frames_stand[]

Definition at line 81 of file m_boss31.c.

◆ jorg_frames_start_attack1

mframe_t jorg_frames_start_attack1[]
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 }
}

Definition at line 349 of file m_boss31.c.

◆ jorg_frames_start_walk

mframe_t jorg_frames_start_walk[]
Initial value:
= {
{ ai_walk, 5, NULL },
{ ai_walk, 6, NULL },
{ ai_walk, 7, NULL },
{ ai_walk, 9, NULL },
{ ai_walk, 15, NULL }
}

Definition at line 185 of file m_boss31.c.

◆ jorg_frames_walk

mframe_t jorg_frames_walk[]
Initial value:
= {
{ ai_walk, 17, NULL },
{ ai_walk, 0, NULL },
{ ai_walk, 0, NULL },
{ ai_walk, 0, NULL },
{ ai_walk, 12, NULL },
{ ai_walk, 8, NULL },
{ ai_walk, 10, NULL },
{ ai_walk, 33, NULL },
{ ai_walk, 0, NULL },
{ ai_walk, 0, NULL },
{ ai_walk, 0, NULL },
{ ai_walk, 9, NULL },
{ ai_walk, 9, NULL },
{ ai_walk, 9, NULL }
}

Definition at line 194 of file m_boss31.c.

◆ jorg_move_attack1

Definition at line 369 of file m_boss31.c.

Referenced by jorg_attack1(), and jorg_reattack1().

◆ jorg_move_attack2

Definition at line 347 of file m_boss31.c.

Referenced by jorg_attack().

◆ jorg_move_death

Definition at line 330 of file m_boss31.c.

Referenced by jorg_die().

◆ jorg_move_end_attack1

Definition at line 377 of file m_boss31.c.

Referenced by jorg_reattack1().

◆ jorg_move_end_walk

mmove_t jorg_move_end_walk = {FRAME_walk20, FRAME_walk25, jorg_frames_end_walk, NULL}

Definition at line 220 of file m_boss31.c.

◆ jorg_move_pain1

Definition at line 276 of file m_boss31.c.

Referenced by jorg_pain().

◆ jorg_move_pain2

Definition at line 269 of file m_boss31.c.

Referenced by jorg_pain().

◆ jorg_move_pain3

Definition at line 262 of file m_boss31.c.

Referenced by jorg_pain().

◆ jorg_move_run

mmove_t jorg_move_run = {FRAME_walk06, FRAME_walk19, jorg_frames_run, NULL}

Definition at line 179 of file m_boss31.c.

Referenced by jorg_run().

◆ jorg_move_stand

Definition at line 134 of file m_boss31.c.

Referenced by jorg_run(), jorg_stand(), and SP_monster_jorg().

◆ jorg_move_start_attack1

Definition at line 359 of file m_boss31.c.

Referenced by jorg_attack().

◆ jorg_move_start_walk

mmove_t jorg_move_start_walk = {FRAME_walk01, FRAME_walk05, jorg_frames_start_walk, NULL}

Definition at line 192 of file m_boss31.c.

◆ jorg_move_walk

mmove_t jorg_move_walk = {FRAME_walk06, FRAME_walk19, jorg_frames_walk, NULL}

Definition at line 210 of file m_boss31.c.

Referenced by jorg_walk().

◆ sound_attack1

int sound_attack1
static

Definition at line 40 of file m_boss31.c.

Referenced by jorg_attack(), and SP_monster_jorg().

◆ sound_attack2

int sound_attack2
static

Definition at line 41 of file m_boss31.c.

Referenced by jorg_attack(), jorgBFG(), and SP_monster_jorg().

◆ sound_death

int sound_death
static

Definition at line 36 of file m_boss31.c.

Referenced by jorg_die(), and SP_monster_jorg().

◆ sound_death_hit

int sound_death_hit
static

Definition at line 45 of file m_boss31.c.

Referenced by jorg_death_hit(), and SP_monster_jorg().

◆ sound_firegun

int sound_firegun
static

Definition at line 42 of file m_boss31.c.

Referenced by SP_monster_jorg().

◆ sound_idle

int sound_idle
static

Definition at line 35 of file m_boss31.c.

Referenced by jorg_idle(), and SP_monster_jorg().

◆ sound_pain1

int sound_pain1
static

Definition at line 32 of file m_boss31.c.

Referenced by jorg_pain(), and SP_monster_jorg().

◆ sound_pain2

int sound_pain2
static

Definition at line 33 of file m_boss31.c.

Referenced by jorg_pain(), and SP_monster_jorg().

◆ sound_pain3

int sound_pain3
static

Definition at line 34 of file m_boss31.c.

Referenced by jorg_pain(), and SP_monster_jorg().

◆ sound_search1

int sound_search1
static

Definition at line 37 of file m_boss31.c.

Referenced by jorg_search(), and SP_monster_jorg().

◆ sound_search2

int sound_search2
static

Definition at line 38 of file m_boss31.c.

Referenced by jorg_search(), and SP_monster_jorg().

◆ sound_search3

int sound_search3
static

Definition at line 39 of file m_boss31.c.

Referenced by jorg_search(), and SP_monster_jorg().

◆ sound_step_left

int sound_step_left
static

Definition at line 43 of file m_boss31.c.

Referenced by jorg_step_left(), and SP_monster_jorg().

◆ sound_step_right

int sound_step_right
static

Definition at line 44 of file m_boss31.c.

Referenced by jorg_step_right(), and SP_monster_jorg().

gi
game_import_t gi
Definition: g_main.c:23
FRAME_attak109
#define FRAME_attak109
Definition: m_boss31.h:30
makron_attack
void makron_attack(edict_t *self)
Definition: m_boss32.c:583
jorg_move_death
mmove_t jorg_move_death
Definition: m_boss31.c:330
RANGE_NEAR
#define RANGE_NEAR
Definition: g_local.h:117
deathmatch
cvar_t * deathmatch
Definition: g_main.c:33
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
jorg_firebullet
void jorg_firebullet(edict_t *self)
Definition: m_boss31.c:510
DEAD_DEAD
#define DEAD_DEAD
Definition: g_local.h:112
G_Spawn
edict_t * G_Spawn(void)
Definition: g_utils.c:391
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
ai_charge
void ai_charge(edict_t *self, float dist)
Definition: g_ai.c:175
jorg_attack
void jorg_attack(edict_t *self)
Definition: m_boss31.c:516
jorg_step_left
void jorg_step_left(edict_t *self)
Definition: m_boss31.c:147
sound_step_left
static int sound_step_left
Definition: m_boss32.c:43
jorg_move_stand
mmove_t jorg_move_stand
Definition: m_boss31.c:134
MakronSpawn
void MakronSpawn(edict_t *self)
Definition: m_boss32.c:830
FRAME_attak114
#define FRAME_attak114
Definition: m_boss31.h:35
sound_death_hit
static int sound_death_hit
Definition: m_boss31.c:45
jorg_move_attack2
mmove_t jorg_move_attack2
Definition: m_boss31.c:347
AI_STAND_GROUND
#define AI_STAND_GROUND
Definition: g_local.h:126
sound_pain2
static int sound_pain2
Definition: m_boss31.c:33
MODEL_SCALE
#define MODEL_SCALE
Definition: m_actor.h:504
sound_firegun
static int sound_firegun
Definition: m_boss31.c:42
sound_pain3
static int sound_pain3
Definition: m_boss31.c:34
vectoyaw
float vectoyaw(vec3_t vec)
Definition: g_utils.c:310
jorg_move_end_attack1
mmove_t jorg_move_end_attack1
Definition: m_boss31.c:377
jorg_move_attack1
mmove_t jorg_move_attack1
Definition: m_boss31.c:369
visible
qboolean visible(edict_t *self, edict_t *other)
Definition: g_ai.c:268
sound_step_right
static int sound_step_right
Definition: m_boss32.c:44
jorg_pain
void jorg_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: m_boss31.c:399
sound_attack_bfg
static int sound_attack_bfg
Definition: m_boss32.c:45
sound_idle
static int sound_idle
Definition: m_boss31.c:35
jorg_walk
void jorg_walk(edict_t *self)
Definition: m_boss31.c:222
sound_prerailgun
static int sound_prerailgun
Definition: m_boss32.c:47
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
sound_taunt3
static int sound_taunt3
Definition: m_boss32.c:51
sound_pain4
static int sound_pain4
Definition: m_boss32.c:39
sound_taunt1
static int sound_taunt1
Definition: m_boss32.c:49
FRAME_attak201
#define FRAME_attak201
Definition: m_boss31.h:40
FRAME_attak208
#define FRAME_attak208
Definition: m_boss31.h:47
vec3_origin
vec3_t vec3_origin
Definition: shared.c:21
DEFAULT_BULLET_VSPREAD
#define DEFAULT_BULLET_VSPREAD
Definition: g_local.h:655
jorg_move_pain3
mmove_t jorg_move_pain3
Definition: m_boss31.c:262
makron_die
void makron_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: m_boss32.c:643
Jorg_CheckAttack
qboolean Jorg_CheckAttack(edict_t *self)
Definition: m_boss31.c:567
jorg_firebullet_left
void jorg_firebullet_left(edict_t *self)
Definition: m_boss31.c:494
G_FreeEdict
void G_FreeEdict(edict_t *e)
Definition: g_utils.c:421
GIB_METALLIC
#define GIB_METALLIC
Definition: g_local.h:123
jorg_move_walk
mmove_t jorg_move_walk
Definition: m_boss31.c:210
sound_search3
static int sound_search3
Definition: m_boss31.c:39
MakronPrecache
void MakronPrecache(void)
Definition: m_boss32.c:762
AS_SLIDING
#define AS_SLIDING
Definition: g_local.h:144
forward
static vec3_t forward
Definition: p_view.c:27
svc_temp_entity
#define svc_temp_entity
Definition: g_local.h:38
AS_MISSILE
#define AS_MISSILE
Definition: g_local.h:146
sound_pain6
static int sound_pain6
Definition: m_boss32.c:41
sound_attack1
static int sound_attack1
Definition: m_boss31.c:40
makron_stand
void makron_stand(edict_t *self)
Definition: m_boss32.c:135
jorg_run
void jorg_run(edict_t *self)
Definition: m_boss31.c:227
ai_walk
void ai_walk(edict_t *self, float dist)
Definition: g_ai.c:148
random
#define random()
Definition: g_local.h:504
sound_step_right
static int sound_step_right
Definition: m_boss31.c:44
AngleVectors
void AngleVectors(vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
Definition: shared.c:23
DAMAGE_NO
@ DAMAGE_NO
Definition: g_local.h:87
sound_attack2
static int sound_attack2
Definition: m_boss31.c:41
sound_pain5
static int sound_pain5
Definition: m_boss32.c:40
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
skill
cvar_t * skill
Definition: g_main.c:36
makron_walk
void makron_walk(edict_t *self)
Definition: m_boss32.c:199
sound_brainsplorch
static int sound_brainsplorch
Definition: m_boss32.c:46
ai_move
void ai_move(edict_t *self, float dist)
Definition: g_ai.c:86
jorg_move_run
mmove_t jorg_move_run
Definition: m_boss31.c:179
monster_fire_bfg
void monster_fire_bfg(edict_t *self, vec3_t start, vec3_t aimdir, int damage, int speed, int kick, float damage_radius, int flashtype)
Definition: g_monster.c:89
jorgBFG
void jorgBFG(edict_t *self)
Definition: m_boss31.c:452
level_locals_t::time
float time
Definition: g_local.h:299
jorg_step_right
void jorg_step_right(edict_t *self)
Definition: m_boss31.c:152
BossExplode
void BossExplode(edict_t *self)
Definition: m_supertank.c:569
Makron_CheckAttack
qboolean Makron_CheckAttack(edict_t *self)
Definition: m_boss32.c:680
FRAME_attak108
#define FRAME_attak108
Definition: m_boss31.h:29
MakronPrecache
void MakronPrecache(void)
Definition: m_boss32.c:762
sound_death
static int sound_death
Definition: m_boss31.c:36
sound_popup
static int sound_popup
Definition: m_boss32.c:48
RANGE_MELEE
#define RANGE_MELEE
Definition: g_local.h:116
jorg_search
void jorg_search(edict_t *self)
Definition: m_boss31.c:51
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
jorg_stand
void jorg_stand(edict_t *self)
Definition: m_boss31.c:158
enemy_range
int enemy_range
Definition: g_ai.c:28
GIB_ORGANIC
#define GIB_ORGANIC
Definition: g_local.h:122
sound_search1
static int sound_search1
Definition: m_boss31.c:37
level
level_locals_t level
Definition: g_main.c:22
sound_pain1
static int sound_pain1
Definition: m_boss31.c:32
RANGE_MID
#define RANGE_MID
Definition: g_local.h:118
FL_FLY
#define FL_FLY
Definition: g_local.h:59
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
jorg_move_pain1
mmove_t jorg_move_pain1
Definition: m_boss31.c:276
jorg_firebullet_right
void jorg_firebullet_right(edict_t *self)
Definition: m_boss31.c:478
MOVETYPE_TOSS
@ MOVETYPE_TOSS
Definition: g_local.h:194
range
int range(edict_t *self, edict_t *other)
Definition: g_ai.c:245
sound_taunt2
static int sound_taunt2
Definition: m_boss32.c:50
sound_step_left
static int sound_step_left
Definition: m_boss31.c:43
makron_sight
void makron_sight(edict_t *self, edict_t *other)
Definition: m_boss32.c:578
sound_search2
static int sound_search2
Definition: m_boss31.c:38
jorg_move_start_attack1
mmove_t jorg_move_start_attack1
Definition: m_boss31.c:359
sound_hit
static int sound_hit
Definition: m_boss32.c:52
AS_MELEE
#define AS_MELEE
Definition: g_local.h:145
RANGE_FAR
#define RANGE_FAR
Definition: g_local.h:119
VectorNormalize
vec_t VectorNormalize(vec3_t v)
Definition: shared.c:55
enemy_yaw
float enemy_yaw
Definition: g_ai.c:29
makron_pain
void makron_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: m_boss32.c:538
sound_death
static int sound_death
Definition: m_boss32.c:42
SP_monster_makron
void SP_monster_makron(edict_t *self)
Definition: m_boss32.c:784
jorg_move_pain2
mmove_t jorg_move_pain2
Definition: m_boss31.c:269
FRAME_attak101
#define FRAME_attak101
Definition: m_boss31.h:22
makron_move_sight
mmove_t makron_move_sight
Definition: m_boss32.c:397
makron_run
void makron_run(edict_t *self)
Definition: m_boss32.c:204
AS_STRAIGHT
#define AS_STRAIGHT
Definition: g_local.h:143
jorg_die
void jorg_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: m_boss31.c:557