icculus quake2 doxygen  1.0 dev
m_medic.c File Reference
#include "g_local.h"
#include "m_medic.h"

Go to the source code of this file.

Functions

qboolean visible (edict_t *self, edict_t *other)
 
edict_tmedic_FindDeadMonster (edict_t *self)
 
void medic_idle (edict_t *self)
 
void medic_search (edict_t *self)
 
void medic_sight (edict_t *self, edict_t *other)
 
void medic_stand (edict_t *self)
 
void medic_walk (edict_t *self)
 
void medic_run (edict_t *self)
 
void medic_pain (edict_t *self, edict_t *other, float kick, int damage)
 
void medic_fire_blaster (edict_t *self)
 
void medic_dead (edict_t *self)
 
void medic_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
 
void medic_duck_down (edict_t *self)
 
void medic_duck_hold (edict_t *self)
 
void medic_duck_up (edict_t *self)
 
void medic_dodge (edict_t *self, edict_t *attacker, float eta)
 
void medic_continue (edict_t *self)
 
void medic_hook_launch (edict_t *self)
 
void ED_CallSpawn (edict_t *ent)
 
void medic_cable_attack (edict_t *self)
 
void medic_hook_retract (edict_t *self)
 
void medic_attack (edict_t *self)
 
qboolean medic_checkattack (edict_t *self)
 
void SP_monster_medic (edict_t *self)
 

Variables

static int sound_idle1
 
static int sound_pain1
 
static int sound_pain2
 
static int sound_die
 
static int sound_sight
 
static int sound_search
 
static int sound_hook_launch
 
static int sound_hook_hit
 
static int sound_hook_heal
 
static int sound_hook_retract
 
mframe_t medic_frames_stand []
 
mmove_t medic_move_stand = {FRAME_wait1, FRAME_wait90, medic_frames_stand, NULL}
 
mframe_t medic_frames_walk []
 
mmove_t medic_move_walk = {FRAME_walk1, FRAME_walk12, medic_frames_walk, NULL}
 
mframe_t medic_frames_run []
 
mmove_t medic_move_run = {FRAME_run1, FRAME_run6, medic_frames_run, NULL}
 
mframe_t medic_frames_pain1 []
 
mmove_t medic_move_pain1 = {FRAME_paina1, FRAME_paina8, medic_frames_pain1, medic_run}
 
mframe_t medic_frames_pain2 []
 
mmove_t medic_move_pain2 = {FRAME_painb1, FRAME_painb15, medic_frames_pain2, medic_run}
 
mframe_t medic_frames_death []
 
mmove_t medic_move_death = {FRAME_death1, FRAME_death30, medic_frames_death, medic_dead}
 
mframe_t medic_frames_duck []
 
mmove_t medic_move_duck = {FRAME_duck1, FRAME_duck16, medic_frames_duck, medic_run}
 
mframe_t medic_frames_attackHyperBlaster []
 
mmove_t medic_move_attackHyperBlaster = {FRAME_attack15, FRAME_attack30, medic_frames_attackHyperBlaster, medic_run}
 
mframe_t medic_frames_attackBlaster []
 
mmove_t medic_move_attackBlaster = {FRAME_attack1, FRAME_attack14, medic_frames_attackBlaster, medic_run}
 
static vec3_t medic_cable_offsets []
 
mframe_t medic_frames_attackCable []
 
mmove_t medic_move_attackCable = {FRAME_attack33, FRAME_attack60, medic_frames_attackCable, medic_run}
 

Function Documentation

◆ ED_CallSpawn()

void ED_CallSpawn ( edict_t ent)

Definition at line 278 of file g_spawn.c.

279 {
280  spawn_t *s;
281  gitem_t *item;
282  int i;
283 
284  if (!ent->classname)
285  {
286  gi.dprintf ("ED_CallSpawn: NULL classname\n");
287  return;
288  }
289 
290  // check item spawn functions
291  for (i=0,item=itemlist ; i<game.num_items ; i++,item++)
292  {
293  if (!item->classname)
294  continue;
295  if (!strcmp(item->classname, ent->classname))
296  { // found it
297  SpawnItem (ent, item);
298  return;
299  }
300  }
301 
302  // check normal spawn functions
303  for (s=spawns ; s->name ; s++)
304  {
305  if (!strcmp(s->name, ent->classname))
306  { // found it
307  s->spawn (ent);
308  return;
309  }
310  }
311  gi.dprintf ("%s doesn't have a spawn function\n", ent->classname);
312 }

Referenced by medic_cable_attack(), and SpawnEntities().

◆ medic_attack()

void medic_attack ( edict_t self)

Definition at line 696 of file m_medic.c.

697 {
698  if (self->monsterinfo.aiflags & AI_MEDIC)
699  self->monsterinfo.currentmove = &medic_move_attackCable;
700  else
701  self->monsterinfo.currentmove = &medic_move_attackBlaster;
702 }

Referenced by medic_checkattack(), and SP_monster_medic().

◆ medic_cable_attack()

void medic_cable_attack ( edict_t self)

Definition at line 576 of file m_medic.c.

577 {
578  vec3_t offset, start, end, f, r;
579  trace_t tr;
580  vec3_t dir, angles;
581  float distance;
582 
583  if (!self->enemy->inuse)
584  return;
585 
586  AngleVectors (self->s.angles, f, r, NULL);
588  G_ProjectSource (self->s.origin, offset, f, r, start);
589 
590  // check for max distance
591  VectorSubtract (start, self->enemy->s.origin, dir);
592  distance = VectorLength(dir);
593  if (distance > 256)
594  return;
595 
596  // check for min/max pitch
597  vectoangles (dir, angles);
598  if (angles[0] < -180)
599  angles[0] += 360;
600  if (fabs(angles[0]) > 45)
601  return;
602 
603  tr = gi.trace (start, NULL, NULL, self->enemy->s.origin, self, MASK_SHOT);
604  if (tr.fraction != 1.0 && tr.ent != self->enemy)
605  return;
606 
607  if (self->s.frame == FRAME_attack43)
608  {
609  gi.sound (self->enemy, CHAN_AUTO, sound_hook_hit, 1, ATTN_NORM, 0);
610  self->enemy->monsterinfo.aiflags |= AI_RESURRECTING;
611  }
612  else if (self->s.frame == FRAME_attack50)
613  {
614  self->enemy->spawnflags = 0;
615  self->enemy->monsterinfo.aiflags = 0;
616  self->enemy->target = NULL;
617  self->enemy->targetname = NULL;
618  self->enemy->combattarget = NULL;
619  self->enemy->deathtarget = NULL;
620  self->enemy->owner = self;
621  ED_CallSpawn (self->enemy);
622  self->enemy->owner = NULL;
623  if (self->enemy->think)
624  {
625  self->enemy->nextthink = level.time;
626  self->enemy->think (self->enemy);
627  }
628  self->enemy->monsterinfo.aiflags |= AI_RESURRECTING;
629  if (self->oldenemy && self->oldenemy->client)
630  {
631  self->enemy->enemy = self->oldenemy;
632  FoundTarget (self->enemy);
633  }
634  }
635  else
636  {
637  if (self->s.frame == FRAME_attack44)
638  gi.sound (self, CHAN_WEAPON, sound_hook_heal, 1, ATTN_NORM, 0);
639  }
640 
641  // adjust start for beam origin being in middle of a segment
642  VectorMA (start, 8, f, start);
643 
644  // adjust end z for end spot since the monster is currently dead
645  VectorCopy (self->enemy->s.origin, end);
646  end[2] = self->enemy->absmin[2] + self->enemy->size[2] / 2;
647 
650  gi.WriteShort (self - g_edicts);
651  gi.WritePosition (start);
652  gi.WritePosition (end);
653  gi.multicast (self->s.origin, MULTICAST_PVS);
654 }

◆ medic_checkattack()

qboolean medic_checkattack ( edict_t self)

Definition at line 704 of file m_medic.c.

705 {
706  if (self->monsterinfo.aiflags & AI_MEDIC)
707  {
708  medic_attack(self);
709  return true;
710  }
711 
712  return M_CheckAttack (self);
713 }

Referenced by SP_monster_medic().

◆ medic_continue()

void medic_continue ( edict_t self)

Definition at line 527 of file m_medic.c.

528 {
529  if (visible (self, self->enemy) )
530  if (random() <= 0.95)
531  self->monsterinfo.currentmove = &medic_move_attackHyperBlaster;
532 }

◆ medic_dead()

void medic_dead ( edict_t self)

Definition at line 368 of file m_medic.c.

369 {
370  VectorSet (self->mins, -16, -16, -24);
371  VectorSet (self->maxs, 16, 16, -8);
372  self->movetype = MOVETYPE_TOSS;
373  self->svflags |= SVF_DEADMONSTER;
374  self->nextthink = 0;
375  gi.linkentity (self);
376 }

◆ medic_die()

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

Definition at line 413 of file m_medic.c.

414 {
415  int n;
416 
417  // if we had a pending patient, free him up for another medic
418  if ((self->enemy) && (self->enemy->owner == self))
419  self->enemy->owner = NULL;
420 
421 // check for gib
422  if (self->health <= self->gib_health)
423  {
424  gi.sound (self, CHAN_VOICE, gi.soundindex ("misc/udeath.wav"), 1, ATTN_NORM, 0);
425  for (n= 0; n < 2; n++)
426  ThrowGib (self, "models/objects/gibs/bone/tris.md2", damage, GIB_ORGANIC);
427  for (n= 0; n < 4; n++)
428  ThrowGib (self, "models/objects/gibs/sm_meat/tris.md2", damage, GIB_ORGANIC);
429  ThrowHead (self, "models/objects/gibs/head2/tris.md2", damage, GIB_ORGANIC);
430  self->deadflag = DEAD_DEAD;
431  return;
432  }
433 
434  if (self->deadflag == DEAD_DEAD)
435  return;
436 
437 // regular death
438  gi.sound (self, CHAN_VOICE, sound_die, 1, ATTN_NORM, 0);
439  self->deadflag = DEAD_DEAD;
440  self->takedamage = DAMAGE_YES;
441 
442  self->monsterinfo.currentmove = &medic_move_death;
443 }

Referenced by SP_monster_medic().

◆ medic_dodge()

void medic_dodge ( edict_t self,
edict_t attacker,
float  eta 
)

Definition at line 494 of file m_medic.c.

495 {
496  if (random() > 0.25)
497  return;
498 
499  if (!self->enemy)
500  self->enemy = attacker;
501 
503 }

Referenced by SP_monster_medic().

◆ medic_duck_down()

void medic_duck_down ( edict_t self)

Definition at line 446 of file m_medic.c.

447 {
448  if (self->monsterinfo.aiflags & AI_DUCKED)
449  return;
450  self->monsterinfo.aiflags |= AI_DUCKED;
451  self->maxs[2] -= 32;
452  self->takedamage = DAMAGE_YES;
453  self->monsterinfo.pausetime = level.time + 1;
454  gi.linkentity (self);
455 }

◆ medic_duck_hold()

void medic_duck_hold ( edict_t self)

Definition at line 457 of file m_medic.c.

458 {
459  if (level.time >= self->monsterinfo.pausetime)
460  self->monsterinfo.aiflags &= ~AI_HOLD_FRAME;
461  else
462  self->monsterinfo.aiflags |= AI_HOLD_FRAME;
463 }

◆ medic_duck_up()

void medic_duck_up ( edict_t self)

Definition at line 465 of file m_medic.c.

466 {
467  self->monsterinfo.aiflags &= ~AI_DUCKED;
468  self->maxs[2] += 32;
469  self->takedamage = DAMAGE_AIM;
470  gi.linkentity (self);
471 }

◆ medic_FindDeadMonster()

edict_t* medic_FindDeadMonster ( edict_t self)

Definition at line 46 of file m_medic.c.

47 {
48  edict_t *ent = NULL;
49  edict_t *best = NULL;
50 
51  while ((ent = findradius(ent, self->s.origin, 1024)) != NULL)
52  {
53  if (ent == self)
54  continue;
55  if (!(ent->svflags & SVF_MONSTER))
56  continue;
57  if (ent->monsterinfo.aiflags & AI_GOOD_GUY)
58  continue;
59  if (ent->owner)
60  continue;
61  if (ent->health > 0)
62  continue;
63  if (ent->nextthink)
64  continue;
65  if (!visible(self, ent))
66  continue;
67  if (!best)
68  {
69  best = ent;
70  continue;
71  }
72  if (ent->max_health <= best->max_health)
73  continue;
74  best = ent;
75  }
76 
77  return best;
78 }

Referenced by medic_idle(), medic_run(), and medic_search().

◆ medic_fire_blaster()

void medic_fire_blaster ( edict_t self)

Definition at line 342 of file m_medic.c.

343 {
344  vec3_t start;
346  vec3_t end;
347  vec3_t dir;
348  int effect;
349 
350  if ((self->s.frame == FRAME_attack9) || (self->s.frame == FRAME_attack12))
351  effect = EF_BLASTER;
352  else if ((self->s.frame == FRAME_attack19) || (self->s.frame == FRAME_attack22) || (self->s.frame == FRAME_attack25) || (self->s.frame == FRAME_attack28))
353  effect = EF_HYPERBLASTER;
354  else
355  effect = 0;
356 
357  AngleVectors (self->s.angles, forward, right, NULL);
359 
360  VectorCopy (self->enemy->s.origin, end);
361  end[2] += self->enemy->viewheight;
362  VectorSubtract (end, start, dir);
363 
364  monster_fire_blaster (self, start, dir, 2, 1000, MZ2_MEDIC_BLASTER_1, effect);
365 }

◆ medic_hook_launch()

void medic_hook_launch ( edict_t self)

Definition at line 555 of file m_medic.c.

556 {
558 }

◆ medic_hook_retract()

void medic_hook_retract ( edict_t self)

Definition at line 656 of file m_medic.c.

657 {
659  self->enemy->monsterinfo.aiflags &= ~AI_RESURRECTING;
660 }

◆ medic_idle()

void medic_idle ( edict_t self)

Definition at line 80 of file m_medic.c.

81 {
82  edict_t *ent;
83 
84  gi.sound (self, CHAN_VOICE, sound_idle1, 1, ATTN_IDLE, 0);
85 
86  ent = medic_FindDeadMonster(self);
87  if (ent)
88  {
89  self->enemy = ent;
90  self->enemy->owner = self;
91  self->monsterinfo.aiflags |= AI_MEDIC;
92  FoundTarget (self);
93  }
94 }

Referenced by SP_monster_medic().

◆ medic_pain()

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

Definition at line 317 of file m_medic.c.

318 {
319  if (self->health < (self->max_health / 2))
320  self->s.skinnum = 1;
321 
322  if (level.time < self->pain_debounce_time)
323  return;
324 
325  self->pain_debounce_time = level.time + 3;
326 
327  if (skill->value == 3)
328  return; // no pain anims in nightmare
329 
330  if (random() < 0.5)
331  {
332  self->monsterinfo.currentmove = &medic_move_pain1;
333  gi.sound (self, CHAN_VOICE, sound_pain1, 1, ATTN_NORM, 0);
334  }
335  else
336  {
337  self->monsterinfo.currentmove = &medic_move_pain2;
338  gi.sound (self, CHAN_VOICE, sound_pain2, 1, ATTN_NORM, 0);
339  }
340 }

Referenced by SP_monster_medic().

◆ medic_run()

void medic_run ( edict_t self)

Definition at line 259 of file m_medic.c.

260 {
261  if (!(self->monsterinfo.aiflags & AI_MEDIC))
262  {
263  edict_t *ent;
264 
265  ent = medic_FindDeadMonster(self);
266  if (ent)
267  {
268  self->oldenemy = self->enemy;
269  self->enemy = ent;
270  self->enemy->owner = self;
271  self->monsterinfo.aiflags |= AI_MEDIC;
272  FoundTarget (self);
273  return;
274  }
275  }
276 
277  if (self->monsterinfo.aiflags & AI_STAND_GROUND)
278  self->monsterinfo.currentmove = &medic_move_stand;
279  else
280  self->monsterinfo.currentmove = &medic_move_run;
281 }

Referenced by SP_monster_medic().

◆ medic_search()

void medic_search ( edict_t self)

Definition at line 96 of file m_medic.c.

97 {
98  edict_t *ent;
99 
100  gi.sound (self, CHAN_VOICE, sound_search, 1, ATTN_IDLE, 0);
101 
102  if (!self->oldenemy)
103  {
104  ent = medic_FindDeadMonster(self);
105  if (ent)
106  {
107  self->oldenemy = self->enemy;
108  self->enemy = ent;
109  self->enemy->owner = self;
110  self->monsterinfo.aiflags |= AI_MEDIC;
111  FoundTarget (self);
112  }
113  }
114 }

Referenced by SP_monster_medic().

◆ medic_sight()

void medic_sight ( edict_t self,
edict_t other 
)

Definition at line 116 of file m_medic.c.

117 {
118  gi.sound (self, CHAN_VOICE, sound_sight, 1, ATTN_NORM, 0);
119 }

Referenced by SP_monster_medic().

◆ medic_stand()

void medic_stand ( edict_t self)

Definition at line 218 of file m_medic.c.

219 {
220  self->monsterinfo.currentmove = &medic_move_stand;
221 }

Referenced by SP_monster_medic().

◆ medic_walk()

void medic_walk ( edict_t self)

Definition at line 241 of file m_medic.c.

242 {
243  self->monsterinfo.currentmove = &medic_move_walk;
244 }

Referenced by SP_monster_medic().

◆ SP_monster_medic()

void SP_monster_medic ( edict_t self)

Definition at line 718 of file m_medic.c.

719 {
720  if (deathmatch->value)
721  {
722  G_FreeEdict (self);
723  return;
724  }
725 
726  sound_idle1 = gi.soundindex ("medic/idle.wav");
727  sound_pain1 = gi.soundindex ("medic/medpain1.wav");
728  sound_pain2 = gi.soundindex ("medic/medpain2.wav");
729  sound_die = gi.soundindex ("medic/meddeth1.wav");
730  sound_sight = gi.soundindex ("medic/medsght1.wav");
731  sound_search = gi.soundindex ("medic/medsrch1.wav");
732  sound_hook_launch = gi.soundindex ("medic/medatck2.wav");
733  sound_hook_hit = gi.soundindex ("medic/medatck3.wav");
734  sound_hook_heal = gi.soundindex ("medic/medatck4.wav");
735  sound_hook_retract = gi.soundindex ("medic/medatck5.wav");
736 
737  gi.soundindex ("medic/medatck1.wav");
738 
739  self->movetype = MOVETYPE_STEP;
740  self->solid = SOLID_BBOX;
741  self->s.modelindex = gi.modelindex ("models/monsters/medic/tris.md2");
742  VectorSet (self->mins, -24, -24, -24);
743  VectorSet (self->maxs, 24, 24, 32);
744 
745  self->health = 300;
746  self->gib_health = -130;
747  self->mass = 400;
748 
749  self->pain = medic_pain;
750  self->die = medic_die;
751 
752  self->monsterinfo.stand = medic_stand;
753  self->monsterinfo.walk = medic_walk;
754  self->monsterinfo.run = medic_run;
755  self->monsterinfo.dodge = medic_dodge;
756  self->monsterinfo.attack = medic_attack;
757  self->monsterinfo.melee = NULL;
758  self->monsterinfo.sight = medic_sight;
759  self->monsterinfo.idle = medic_idle;
760  self->monsterinfo.search = medic_search;
761  self->monsterinfo.checkattack = medic_checkattack;
762 
763  gi.linkentity (self);
764 
765  self->monsterinfo.currentmove = &medic_move_stand;
766  self->monsterinfo.scale = MODEL_SCALE;
767 
768  walkmonster_start (self);
769 }

◆ visible()

qboolean visible ( edict_t self,
edict_t other 
)

Definition at line 287 of file g_ai.c.

288 {
289  vec3_t spot1;
290  vec3_t spot2;
291  trace_t trace;
292 
293  VectorCopy (self->s.origin, spot1);
294  spot1[2] += self->viewheight;
295  VectorCopy (other->s.origin, spot2);
296  spot2[2] += other->viewheight;
297  trace = gi.trace (spot1, vec3_origin, vec3_origin, spot2, self, MASK_OPAQUE);
298 
299  if (trace.fraction == 1.0)
300  return true;
301  return false;
302 }

Referenced by medic_continue(), and medic_FindDeadMonster().

Variable Documentation

◆ medic_cable_offsets

vec3_t medic_cable_offsets[]
static
Initial value:
=
{
{45.0, -9.2, 15.5},
{48.4, -9.7, 15.2},
{47.8, -9.8, 15.8},
{47.3, -9.3, 14.3},
{45.4, -10.1, 13.1},
{41.9, -12.7, 12.0},
{37.8, -15.8, 11.2},
{34.3, -18.4, 10.7},
{32.7, -19.7, 10.4},
{32.7, -19.7, 10.4}
}

Definition at line 562 of file m_medic.c.

Referenced by medic_cable_attack().

◆ medic_frames_attackBlaster

mframe_t medic_frames_attackBlaster[]
Initial value:

Definition at line 535 of file m_medic.c.

◆ medic_frames_attackCable

mframe_t medic_frames_attackCable[]

Definition at line 662 of file m_medic.c.

◆ medic_frames_attackHyperBlaster

◆ medic_frames_death

mframe_t medic_frames_death[]

Definition at line 378 of file m_medic.c.

◆ medic_frames_duck

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

Definition at line 473 of file m_medic.c.

◆ medic_frames_pain1

mframe_t medic_frames_pain1[]
Initial value:
=
{
{ai_move, 0, NULL},
{ai_move, 0, NULL},
{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 284 of file m_medic.c.

◆ medic_frames_pain2

mframe_t medic_frames_pain2[]
Initial value:
=
{
{ai_move, 0, NULL},
{ai_move, 0, NULL},
{ai_move, 0, NULL},
{ai_move, 0, NULL},
{ai_move, 0, NULL},
{ai_move, 0, NULL},
{ai_move, 0, NULL},
{ai_move, 0, NULL},
{ai_move, 0, NULL},
{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 297 of file m_medic.c.

◆ medic_frames_run

mframe_t medic_frames_run[]
Initial value:
=
{
{ai_run, 18, NULL},
{ai_run, 22.5, NULL},
{ai_run, 25.4, NULL},
{ai_run, 23.4, NULL},
{ai_run, 24, NULL},
{ai_run, 35.6, NULL}
}

Definition at line 247 of file m_medic.c.

◆ medic_frames_stand

mframe_t medic_frames_stand[]

Definition at line 122 of file m_medic.c.

◆ medic_frames_walk

mframe_t medic_frames_walk[]
Initial value:
=
{
{ai_walk, 6.2, NULL},
{ai_walk, 18.1, NULL},
{ai_walk, 1, NULL},
{ai_walk, 9, NULL},
{ai_walk, 10, NULL},
{ai_walk, 9, NULL},
{ai_walk, 11, NULL},
{ai_walk, 11.6, NULL},
{ai_walk, 2, NULL},
{ai_walk, 9.9, NULL},
{ai_walk, 14, NULL},
{ai_walk, 9.3, NULL}
}

Definition at line 224 of file m_medic.c.

◆ medic_move_attackBlaster

Definition at line 552 of file m_medic.c.

Referenced by medic_attack().

◆ medic_move_attackCable

Definition at line 693 of file m_medic.c.

Referenced by medic_attack().

◆ medic_move_attackHyperBlaster

Definition at line 524 of file m_medic.c.

Referenced by medic_continue().

◆ medic_move_death

Definition at line 411 of file m_medic.c.

Referenced by medic_die().

◆ medic_move_duck

Definition at line 492 of file m_medic.c.

Referenced by medic_dodge().

◆ medic_move_pain1

Definition at line 295 of file m_medic.c.

Referenced by medic_pain().

◆ medic_move_pain2

Definition at line 315 of file m_medic.c.

Referenced by medic_pain().

◆ medic_move_run

Definition at line 257 of file m_medic.c.

Referenced by medic_run().

◆ medic_move_stand

Definition at line 216 of file m_medic.c.

Referenced by medic_run(), medic_stand(), and SP_monster_medic().

◆ medic_move_walk

Definition at line 239 of file m_medic.c.

Referenced by medic_walk().

◆ sound_die

int sound_die
static

Definition at line 37 of file m_medic.c.

Referenced by medic_die(), and SP_monster_medic().

◆ sound_hook_heal

int sound_hook_heal
static

Definition at line 42 of file m_medic.c.

Referenced by medic_cable_attack(), and SP_monster_medic().

◆ sound_hook_hit

int sound_hook_hit
static

Definition at line 41 of file m_medic.c.

Referenced by medic_cable_attack(), and SP_monster_medic().

◆ sound_hook_launch

int sound_hook_launch
static

Definition at line 40 of file m_medic.c.

Referenced by medic_hook_launch(), and SP_monster_medic().

◆ sound_hook_retract

int sound_hook_retract
static

Definition at line 43 of file m_medic.c.

Referenced by medic_hook_retract(), and SP_monster_medic().

◆ sound_idle1

int sound_idle1
static

Definition at line 34 of file m_medic.c.

Referenced by medic_idle(), and SP_monster_medic().

◆ sound_pain1

int sound_pain1
static

Definition at line 35 of file m_medic.c.

Referenced by medic_pain(), and SP_monster_medic().

◆ sound_pain2

int sound_pain2
static

Definition at line 36 of file m_medic.c.

Referenced by medic_pain(), and SP_monster_medic().

◆ sound_search

int sound_search
static

Definition at line 39 of file m_medic.c.

Referenced by medic_search(), and SP_monster_medic().

◆ sound_sight

int sound_sight
static

Definition at line 38 of file m_medic.c.

Referenced by medic_sight(), and SP_monster_medic().

gi
game_import_t gi
Definition: g_main.c:25
AI_RESURRECTING
#define AI_RESURRECTING
Definition: g_local.h:141
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
game_import_t::dprintf
void(* dprintf)(char *fmt,...)
Definition: game.h:106
edict_s::s
entity_state_t s
Definition: g_local.h:964
deathmatch
cvar_t * deathmatch
Definition: g_main.c:35
medic_attack
void medic_attack(edict_t *self)
Definition: m_medic.c:696
AI_MEDIC
#define AI_MEDIC
Definition: g_local.h:140
DEAD_DEAD
#define DEAD_DEAD
Definition: g_local.h:113
sound_die
static int sound_die
Definition: m_medic.c:37
game_import_t::trace
trace_t(* trace)(vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, edict_t *passent, int contentmask)
Definition: game.h:128
trace_t::fraction
float fraction
Definition: q_shared.h:453
ThrowGib
void ThrowGib(edict_t *self, char *gibname, int damage, int type)
Definition: g_misc.c:135
medic_checkattack
qboolean medic_checkattack(edict_t *self)
Definition: m_medic.c:704
edict_s::gib_health
int gib_health
Definition: g_local.h:1053
VectorSubtract
#define VectorSubtract(a, b, c)
Definition: q_shared.h:156
entity_state_s::frame
int frame
Definition: q_shared.h:1178
ED_CallSpawn
void ED_CallSpawn(edict_t *ent)
Definition: g_spawn.c:278
ai_charge
void ai_charge(edict_t *self, float dist)
Definition: g_ai.c:194
AI_GOOD_GUY
#define AI_GOOD_GUY
Definition: g_local.h:135
game_import_t::WritePosition
void(* WritePosition)(vec3_t pos)
Definition: game.h:152
game_import_t::multicast
void(* multicast)(vec3_t origin, multicast_t to)
Definition: game.h:144
SOLID_BBOX
@ SOLID_BBOX
Definition: game.h:37
spawn_t::spawn
void(* spawn)(edict_t *ent)
Definition: g_spawn.c:26
sound_hook_heal
static int sound_hook_heal
Definition: m_medic.c:42
sound_search
static int sound_search
Definition: m_medic.c:39
medic_sight
void medic_sight(edict_t *self, edict_t *other)
Definition: m_medic.c:116
FRAME_attack28
#define FRAME_attack28
Definition: m_boss2.h:121
entity_state_s::origin
vec3_t origin
Definition: q_shared.h:1173
FRAME_attack43
#define FRAME_attack43
Definition: m_medic.h:243
TE_MEDIC_CABLE_ATTACK
@ TE_MEDIC_CABLE_ATTACK
Definition: q_shared.h:954
sound_hook_hit
static int sound_hook_hit
Definition: m_medic.c:41
AI_STAND_GROUND
#define AI_STAND_GROUND
Definition: g_local.h:127
edict_s::inuse
qboolean inuse
Definition: g_local.h:970
edict_s::oldenemy
edict_t * oldenemy
Definition: g_local.h:1071
SpawnItem
void SpawnItem(edict_t *ent, gitem_t *item)
Definition: g_items.c:1061
trace_t
Definition: q_shared.h:449
i
int i
Definition: q_shared.c:305
MODEL_SCALE
#define MODEL_SCALE
Definition: m_actor.h:506
edict_s::max_health
int max_health
Definition: g_local.h:1052
medic_run
void medic_run(edict_t *self)
Definition: m_medic.c:259
DAMAGE_YES
@ DAMAGE_YES
Definition: g_local.h:87
edict_s::client
struct gclient_s * client
Definition: g_local.h:965
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:1020
MASK_SHOT
#define MASK_SHOT
Definition: q_shared.h:397
edict_s::mins
vec3_t mins
Definition: g_local.h:984
monsterinfo_t::currentmove
mmove_t * currentmove
Definition: g_local.h:418
medic_duck_hold
void medic_duck_hold(edict_t *self)
Definition: m_medic.c:457
M_CheckAttack
qboolean M_CheckAttack(edict_t *self)
Definition: g_ai.c:607
g_edicts
edict_t * g_edicts
Definition: g_main.c:33
ATTN_NORM
#define ATTN_NORM
Definition: q_shared.h:1019
itemlist
gitem_t itemlist[]
Definition: g_items.c:1134
walkmonster_start
void walkmonster_start(edict_t *self)
Definition: g_monster.c:692
MOVETYPE_STEP
@ MOVETYPE_STEP
Definition: g_local.h:194
medic_move_pain2
mmove_t medic_move_pain2
Definition: m_medic.c:315
visible
qboolean visible(edict_t *self, edict_t *other)
Definition: g_ai.c:287
MZ2_MEDIC_BLASTER_1
#define MZ2_MEDIC_BLASTER_1
Definition: q_shared.h:759
medic_cable_offsets
static vec3_t medic_cable_offsets[]
Definition: m_medic.c:562
sound_pain2
static int sound_pain2
Definition: m_medic.c:36
SVF_DEADMONSTER
#define SVF_DEADMONSTER
Definition: game.h:28
CHAN_AUTO
#define CHAN_AUTO
Definition: q_shared.h:1007
AngleVectors
void AngleVectors(vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
Definition: q_shared.c:93
edict_s::svflags
int svflags
Definition: g_local.h:983
monster_flash_offset
vec3_t monster_flash_offset[]
Definition: m_flash.c:27
CHAN_VOICE
#define CHAN_VOICE
Definition: q_shared.h:1009
vectoangles
void vectoangles(vec3_t vec, vec3_t angles)
Definition: g_utils.c:356
edict_s::classname
char * classname
Definition: g_local.h:1005
edict_s
Definition: g_local.h:962
medic_walk
void medic_walk(edict_t *self)
Definition: m_medic.c:241
findradius
edict_t * findradius(edict_t *from, vec3_t org, float rad)
Definition: g_utils.c:78
G_FreeEdict
void G_FreeEdict(edict_t *e)
Definition: g_utils.c:452
monsterinfo_t::pausetime
float pausetime
Definition: g_local.h:434
r
GLdouble GLdouble r
Definition: qgl_win.c:336
medic_duck_up
void medic_duck_up(edict_t *self)
Definition: m_medic.c:465
medic_pain
void medic_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: m_medic.c:317
edict_s::viewheight
int viewheight
Definition: g_local.h:1061
sound_idle1
static int sound_idle1
Definition: m_medic.c:34
game_locals_t::num_items
int num_items
Definition: g_local.h:291
game_import_t::soundindex
int(* soundindex)(char *name)
Definition: game.h:122
FRAME_attack12
#define FRAME_attack12
Definition: m_boss2.h:105
forward
static vec3_t forward
Definition: p_view.c:29
EF_BLASTER
#define EF_BLASTER
Definition: q_shared.h:560
VectorLength
vec_t VectorLength(vec3_t v)
Definition: q_shared.c:762
edict_s::owner
edict_t * owner
Definition: g_local.h:988
medic_move_stand
mmove_t medic_move_stand
Definition: m_medic.c:216
AI_HOLD_FRAME
#define AI_HOLD_FRAME
Definition: g_local.h:134
medic_move_attackHyperBlaster
mmove_t medic_move_attackHyperBlaster
Definition: m_medic.c:524
game_import_t::modelindex
int(* modelindex)(char *name)
Definition: game.h:121
edict_s::deadflag
int deadflag
Definition: g_local.h:1054
FRAME_attack19
#define FRAME_attack19
Definition: m_boss2.h:112
medic_move_walk
mmove_t medic_move_walk
Definition: m_medic.c:239
edict_s::nextthink
float nextthink
Definition: g_local.h:1036
cvar_s::value
float value
Definition: q_shared.h:324
spawn_t::name
char * name
Definition: g_spawn.c:25
game
game_locals_t game
Definition: g_main.c:23
edict_s::think
void(* think)(edict_t *self)
Definition: g_local.h:1038
ai_walk
void ai_walk(edict_t *self, float dist)
Definition: g_ai.c:163
FRAME_attack9
#define FRAME_attack9
Definition: m_boss2.h:102
random
#define random()
Definition: g_local.h:509
FRAME_attack25
#define FRAME_attack25
Definition: m_boss2.h:118
medic_move_duck
mmove_t medic_move_duck
Definition: m_medic.c:492
FRAME_attack22
#define FRAME_attack22
Definition: m_boss2.h:115
NULL
#define NULL
Definition: q_shared.h:60
FoundTarget
void FoundTarget(edict_t *self)
Definition: g_ai.c:347
medic_idle
void medic_idle(edict_t *self)
Definition: m_medic.c:80
spawn_t
Definition: g_spawn.c:23
sound_hook_launch
static int sound_hook_launch
Definition: m_medic.c:40
monsterinfo_t::aiflags
int aiflags
Definition: g_local.h:419
sound_sight
static int sound_sight
Definition: m_medic.c:38
skill
cvar_t * skill
Definition: g_main.c:38
medic_move_pain1
mmove_t medic_move_pain1
Definition: m_medic.c:295
MASK_OPAQUE
#define MASK_OPAQUE
Definition: q_shared.h:396
medic_move_run
mmove_t medic_move_run
Definition: m_medic.c:257
ai_move
void ai_move(edict_t *self, float dist)
Definition: g_ai.c:92
medic_fire_blaster
void medic_fire_blaster(edict_t *self)
Definition: m_medic.c:342
game_import_t::WriteShort
void(* WriteShort)(int c)
Definition: game.h:148
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
svc_temp_entity
@ svc_temp_entity
Definition: qcommon.h:210
VectorCopy
#define VectorCopy(a, b)
Definition: q_shared.h:158
edict_s::pain_debounce_time
float pain_debounce_time
Definition: g_local.h:1046
medic_move_attackBlaster
mmove_t medic_move_attackBlaster
Definition: m_medic.c:552
edict_s::monsterinfo
monsterinfo_t monsterinfo
Definition: g_local.h:1108
medic_search
void medic_search(edict_t *self)
Definition: m_medic.c:96
vec3_origin
vec3_t vec3_origin
Definition: q_shared.c:24
DAMAGE_AIM
@ DAMAGE_AIM
Definition: g_local.h:88
CHAN_WEAPON
#define CHAN_WEAPON
Definition: q_shared.h:1008
game_import_t::WriteByte
void(* WriteByte)(int c)
Definition: game.h:147
medic_move_attackCable
mmove_t medic_move_attackCable
Definition: m_medic.c:693
level
GLint level
Definition: qgl_win.c:116
ai_run
void ai_run(edict_t *self, float dist)
Definition: g_ai.c:915
GIB_ORGANIC
#define GIB_ORGANIC
Definition: g_local.h:123
VectorMA
void VectorMA(vec3_t veca, float scale, vec3_t vecb, vec3_t vecc)
Definition: q_shared.c:719
medic_dodge
void medic_dodge(edict_t *self, edict_t *attacker, float eta)
Definition: m_medic.c:494
edict_s::maxs
vec3_t maxs
Definition: g_local.h:984
FRAME_attack42
#define FRAME_attack42
Definition: m_medic.h:242
medic_duck_down
void medic_duck_down(edict_t *self)
Definition: m_medic.c:446
trace_t::ent
struct edict_s * ent
Definition: q_shared.h:458
spawns
spawn_t spawns[]
Definition: g_spawn.c:148
sound_hook_retract
static int sound_hook_retract
Definition: m_medic.c:43
ThrowHead
void ThrowHead(edict_t *self, char *gibname, int damage, int type)
Definition: g_misc.c:183
SVF_MONSTER
#define SVF_MONSTER
Definition: game.h:29
medic_stand
void medic_stand(edict_t *self)
Definition: m_medic.c:218
sound_pain1
static int sound_pain1
Definition: m_medic.c:35
medic_move_death
mmove_t medic_move_death
Definition: m_medic.c:411
medic_continue
void medic_continue(edict_t *self)
Definition: m_medic.c:527
MOVETYPE_TOSS
@ MOVETYPE_TOSS
Definition: g_local.h:196
VectorSet
#define VectorSet(v, x, y, z)
Definition: q_shared.h:161
right
GLdouble right
Definition: qgl_win.c:159
medic_die
void medic_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: m_medic.c:413
edict_s::enemy
edict_t * enemy
Definition: g_local.h:1070
AI_DUCKED
#define AI_DUCKED
Definition: g_local.h:138
game_import_t::linkentity
void(* linkentity)(edict_t *ent)
Definition: game.h:138
entity_state_s::angles
vec3_t angles
Definition: q_shared.h:1174
EF_HYPERBLASTER
#define EF_HYPERBLASTER
Definition: q_shared.h:563
MULTICAST_PVS
@ MULTICAST_PVS
Definition: q_shared.h:111
vec3_t
vec_t vec3_t[3]
Definition: q_shared.h:127
FRAME_attack44
#define FRAME_attack44
Definition: m_medic.h:244
medic_FindDeadMonster
edict_t * medic_FindDeadMonster(edict_t *self)
Definition: m_medic.c:46
FRAME_attack50
#define FRAME_attack50
Definition: m_medic.h:250
edict_s::health
int health
Definition: g_local.h:1051
gitem_s::classname
char * classname
Definition: g_local.h:236
gitem_s
Definition: g_local.h:234