Quake II RTX 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_t * medic_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 340 of file g_spawn.c.

341 {
342  const spawn_func_t *s;
343  gitem_t *item;
344  int i;
345 
346  if (!ent->classname) {
347  gi.dprintf("ED_CallSpawn: NULL classname\n");
348  return;
349  }
350 
351  // check item spawn functions
352  for (i = 0, item = itemlist ; i < game.num_items ; i++, item++) {
353  if (!item->classname)
354  continue;
355  if (!strcmp(item->classname, ent->classname)) {
356  // found it
357  SpawnItem(ent, item);
358  return;
359  }
360  }
361 
362  // check normal spawn functions
363  for (s = spawn_funcs ; s->name ; s++) {
364  if (!strcmp(s->name, ent->classname)) {
365  // found it
366  s->spawn(ent);
367  return;
368  }
369  }
370  gi.dprintf("%s doesn't have a spawn function\n", ent->classname);
371 }

Referenced by medic_cable_attack(), and SpawnEntities().

◆ medic_attack()

void medic_attack ( edict_t *  self)

Definition at line 665 of file m_medic.c.

666 {
667  if (self->monsterinfo.aiflags & AI_MEDIC)
668  self->monsterinfo.currentmove = &medic_move_attackCable;
669  else
670  self->monsterinfo.currentmove = &medic_move_attackBlaster;
671 }

Referenced by medic_checkattack(), and SP_monster_medic().

◆ medic_cable_attack()

void medic_cable_attack ( edict_t *  self)

Definition at line 553 of file m_medic.c.

554 {
555  vec3_t offset, start, end, f, r;
556  trace_t tr;
557  vec3_t dir, angles;
558  float distance;
559 
560  if (!self->enemy->inuse)
561  return;
562 
563  AngleVectors(self->s.angles, f, r, NULL);
564  VectorCopy(medic_cable_offsets[self->s.frame - FRAME_attack42], offset);
565  G_ProjectSource(self->s.origin, offset, f, r, start);
566 
567  // check for max distance
568  VectorSubtract(start, self->enemy->s.origin, dir);
569  distance = VectorLength(dir);
570  if (distance > 256)
571  return;
572 
573  // check for min/max pitch
574  vectoangles(dir, angles);
575  if (angles[0] < -180)
576  angles[0] += 360;
577  if (fabs(angles[0]) > 45)
578  return;
579 
580  tr = gi.trace(start, NULL, NULL, self->enemy->s.origin, self, MASK_SHOT);
581  if (tr.fraction != 1.0 && tr.ent != self->enemy)
582  return;
583 
584  if (self->s.frame == FRAME_attack43) {
585  gi.sound(self->enemy, CHAN_AUTO, sound_hook_hit, 1, ATTN_NORM, 0);
586  self->enemy->monsterinfo.aiflags |= AI_RESURRECTING;
587  } else if (self->s.frame == FRAME_attack50) {
588  self->enemy->spawnflags = 0;
589  self->enemy->monsterinfo.aiflags = 0;
590  self->enemy->target = NULL;
591  self->enemy->targetname = NULL;
592  self->enemy->combattarget = NULL;
593  self->enemy->deathtarget = NULL;
594  self->enemy->owner = self;
595  ED_CallSpawn(self->enemy);
596  self->enemy->owner = NULL;
597  if (self->enemy->think) {
598  self->enemy->nextthink = level.time;
599  self->enemy->think(self->enemy);
600  }
601  self->enemy->monsterinfo.aiflags |= AI_RESURRECTING;
602  if (self->oldenemy && self->oldenemy->client) {
603  self->enemy->enemy = self->oldenemy;
604  FoundTarget(self->enemy);
605  }
606  } else {
607  if (self->s.frame == FRAME_attack44)
608  gi.sound(self, CHAN_WEAPON, sound_hook_heal, 1, ATTN_NORM, 0);
609  }
610 
611  // adjust start for beam origin being in middle of a segment
612  VectorMA(start, 8, f, start);
613 
614  // adjust end z for end spot since the monster is currently dead
615  VectorCopy(self->enemy->s.origin, end);
616  end[2] = self->enemy->absmin[2] + self->enemy->size[2] / 2;
617 
618  gi.WriteByte(svc_temp_entity);
619  gi.WriteByte(TE_MEDIC_CABLE_ATTACK);
620  gi.WriteShort(self - g_edicts);
621  gi.WritePosition(start);
622  gi.WritePosition(end);
623  gi.multicast(self->s.origin, MULTICAST_PVS);
624 }

◆ medic_checkattack()

qboolean medic_checkattack ( edict_t *  self)

Definition at line 673 of file m_medic.c.

674 {
675  if (self->monsterinfo.aiflags & AI_MEDIC) {
676  medic_attack(self);
677  return qtrue;
678  }
679 
680  return M_CheckAttack(self);
681 }

Referenced by SP_monster_medic().

◆ medic_continue()

void medic_continue ( edict_t *  self)

Definition at line 506 of file m_medic.c.

507 {
508  if (visible(self, self->enemy))
509  if (random() <= 0.95)
510  self->monsterinfo.currentmove = &medic_move_attackHyperBlaster;
511 }

◆ medic_dead()

void medic_dead ( edict_t *  self)

Definition at line 351 of file m_medic.c.

352 {
353  VectorSet(self->mins, -16, -16, -24);
354  VectorSet(self->maxs, 16, 16, -8);
355  self->movetype = MOVETYPE_TOSS;
356  self->svflags |= SVF_DEADMONSTER;
357  self->nextthink = 0;
358  gi.linkentity(self);
359 }

◆ medic_die()

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

Definition at line 395 of file m_medic.c.

396 {
397  int n;
398 
399  // if we had a pending patient, free him up for another medic
400  if ((self->enemy) && (self->enemy->owner == self))
401  self->enemy->owner = NULL;
402 
403 // check for gib
404  if (self->health <= self->gib_health) {
405  gi.sound(self, CHAN_VOICE, gi.soundindex("misc/udeath.wav"), 1, ATTN_NORM, 0);
406  for (n = 0; n < 2; n++)
407  ThrowGib(self, "models/objects/gibs/bone/tris.md2", damage, GIB_ORGANIC);
408  for (n = 0; n < 4; n++)
409  ThrowGib(self, "models/objects/gibs/sm_meat/tris.md2", damage, GIB_ORGANIC);
410  ThrowHead(self, "models/objects/gibs/head2/tris.md2", damage, GIB_ORGANIC);
411  self->deadflag = DEAD_DEAD;
412  return;
413  }
414 
415  if (self->deadflag == DEAD_DEAD)
416  return;
417 
418 // regular death
419  gi.sound(self, CHAN_VOICE, sound_die, 1, ATTN_NORM, 0);
420  self->deadflag = DEAD_DEAD;
421  self->takedamage = DAMAGE_YES;
422 
423  self->monsterinfo.currentmove = &medic_move_death;
424 }

Referenced by SP_monster_medic().

◆ medic_dodge()

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

Definition at line 474 of file m_medic.c.

475 {
476  if (random() > 0.25)
477  return;
478 
479  if (!self->enemy)
480  self->enemy = attacker;
481 
482  self->monsterinfo.currentmove = &medic_move_duck;
483 }

Referenced by SP_monster_medic().

◆ medic_duck_down()

void medic_duck_down ( edict_t *  self)

Definition at line 427 of file m_medic.c.

428 {
429  if (self->monsterinfo.aiflags & AI_DUCKED)
430  return;
431  self->monsterinfo.aiflags |= AI_DUCKED;
432  self->maxs[2] -= 32;
433  self->takedamage = DAMAGE_YES;
434  self->monsterinfo.pausetime = level.time + 1;
435  gi.linkentity(self);
436 }

◆ medic_duck_hold()

void medic_duck_hold ( edict_t *  self)

Definition at line 438 of file m_medic.c.

439 {
440  if (level.time >= self->monsterinfo.pausetime)
441  self->monsterinfo.aiflags &= ~AI_HOLD_FRAME;
442  else
443  self->monsterinfo.aiflags |= AI_HOLD_FRAME;
444 }

◆ medic_duck_up()

void medic_duck_up ( edict_t *  self)

Definition at line 446 of file m_medic.c.

447 {
448  self->monsterinfo.aiflags &= ~AI_DUCKED;
449  self->maxs[2] += 32;
450  self->takedamage = DAMAGE_AIM;
451  gi.linkentity(self);
452 }

◆ medic_FindDeadMonster()

edict_t* medic_FindDeadMonster ( edict_t *  self)

Definition at line 44 of file m_medic.c.

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

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

◆ medic_fire_blaster()

void medic_fire_blaster ( edict_t *  self)

Definition at line 325 of file m_medic.c.

326 {
327  vec3_t start;
328  vec3_t forward, right;
329  vec3_t end;
330  vec3_t dir;
331  int effect;
332 
333  if ((self->s.frame == FRAME_attack9) || (self->s.frame == FRAME_attack12))
334  effect = EF_BLASTER;
335  else if ((self->s.frame == FRAME_attack19) || (self->s.frame == FRAME_attack22) || (self->s.frame == FRAME_attack25) || (self->s.frame == FRAME_attack28))
336  effect = EF_HYPERBLASTER;
337  else
338  effect = 0;
339 
340  AngleVectors(self->s.angles, forward, right, NULL);
341  G_ProjectSource(self->s.origin, monster_flash_offset[MZ2_MEDIC_BLASTER_1], forward, right, start);
342 
343  VectorCopy(self->enemy->s.origin, end);
344  end[2] += self->enemy->viewheight;
345  VectorSubtract(end, start, dir);
346 
347  monster_fire_blaster(self, start, dir, 2, 1000, MZ2_MEDIC_BLASTER_1, effect);
348 }

◆ medic_hook_launch()

void medic_hook_launch ( edict_t *  self)

Definition at line 533 of file m_medic.c.

534 {
535  gi.sound(self, CHAN_WEAPON, sound_hook_launch, 1, ATTN_NORM, 0);
536 }

◆ medic_hook_retract()

void medic_hook_retract ( edict_t *  self)

Definition at line 626 of file m_medic.c.

627 {
628  gi.sound(self, CHAN_WEAPON, sound_hook_retract, 1, ATTN_NORM, 0);
629  self->enemy->monsterinfo.aiflags &= ~AI_RESURRECTING;
630 }

◆ medic_idle()

void medic_idle ( edict_t *  self)

Definition at line 76 of file m_medic.c.

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

Referenced by SP_monster_medic().

◆ medic_pain()

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

Definition at line 303 of file m_medic.c.

304 {
305  if (self->health < (self->max_health / 2))
306  self->s.skinnum = 1;
307 
308  if (level.time < self->pain_debounce_time)
309  return;
310 
311  self->pain_debounce_time = level.time + 3;
312 
313  if (skill->value == 3)
314  return; // no pain anims in nightmare
315 
316  if (random() < 0.5) {
317  self->monsterinfo.currentmove = &medic_move_pain1;
318  gi.sound(self, CHAN_VOICE, sound_pain1, 1, ATTN_NORM, 0);
319  } else {
320  self->monsterinfo.currentmove = &medic_move_pain2;
321  gi.sound(self, CHAN_VOICE, sound_pain2, 1, ATTN_NORM, 0);
322  }
323 }

Referenced by SP_monster_medic().

◆ medic_run()

void medic_run ( edict_t *  self)

Definition at line 249 of file m_medic.c.

250 {
251  if (!(self->monsterinfo.aiflags & AI_MEDIC)) {
252  edict_t *ent;
253 
254  ent = medic_FindDeadMonster(self);
255  if (ent) {
256  self->oldenemy = self->enemy;
257  self->enemy = ent;
258  self->enemy->owner = self;
259  self->monsterinfo.aiflags |= AI_MEDIC;
260  FoundTarget(self);
261  return;
262  }
263  }
264 
265  if (self->monsterinfo.aiflags & AI_STAND_GROUND)
266  self->monsterinfo.currentmove = &medic_move_stand;
267  else
268  self->monsterinfo.currentmove = &medic_move_run;
269 }

Referenced by SP_monster_medic().

◆ medic_search()

void medic_search ( edict_t *  self)

Definition at line 91 of file m_medic.c.

92 {
93  edict_t *ent;
94 
95  gi.sound(self, CHAN_VOICE, sound_search, 1, ATTN_IDLE, 0);
96 
97  if (!self->oldenemy) {
98  ent = medic_FindDeadMonster(self);
99  if (ent) {
100  self->oldenemy = self->enemy;
101  self->enemy = ent;
102  self->enemy->owner = self;
103  self->monsterinfo.aiflags |= AI_MEDIC;
104  FoundTarget(self);
105  }
106  }
107 }

Referenced by SP_monster_medic().

◆ medic_sight()

void medic_sight ( edict_t *  self,
edict_t *  other 
)

Definition at line 109 of file m_medic.c.

110 {
111  gi.sound(self, CHAN_VOICE, sound_sight, 1, ATTN_NORM, 0);
112 }

Referenced by SP_monster_medic().

◆ medic_stand()

void medic_stand ( edict_t *  self)

Definition at line 210 of file m_medic.c.

211 {
212  self->monsterinfo.currentmove = &medic_move_stand;
213 }

Referenced by SP_monster_medic().

◆ medic_walk()

void medic_walk ( edict_t *  self)

Definition at line 232 of file m_medic.c.

233 {
234  self->monsterinfo.currentmove = &medic_move_walk;
235 }

Referenced by SP_monster_medic().

◆ SP_monster_medic()

void SP_monster_medic ( edict_t *  self)

Definition at line 686 of file m_medic.c.

687 {
688  if (deathmatch->value) {
689  G_FreeEdict(self);
690  return;
691  }
692 
693  sound_idle1 = gi.soundindex("medic/idle.wav");
694  sound_pain1 = gi.soundindex("medic/medpain1.wav");
695  sound_pain2 = gi.soundindex("medic/medpain2.wav");
696  sound_die = gi.soundindex("medic/meddeth1.wav");
697  sound_sight = gi.soundindex("medic/medsght1.wav");
698  sound_search = gi.soundindex("medic/medsrch1.wav");
699  sound_hook_launch = gi.soundindex("medic/medatck2.wav");
700  sound_hook_hit = gi.soundindex("medic/medatck3.wav");
701  sound_hook_heal = gi.soundindex("medic/medatck4.wav");
702  sound_hook_retract = gi.soundindex("medic/medatck5.wav");
703 
704  gi.soundindex("medic/medatck1.wav");
705 
706  self->movetype = MOVETYPE_STEP;
707  self->solid = SOLID_BBOX;
708  self->s.modelindex = gi.modelindex("models/monsters/medic/tris.md2");
709  VectorSet(self->mins, -24, -24, -24);
710  VectorSet(self->maxs, 24, 24, 32);
711 
712  self->health = 300;
713  self->gib_health = -130;
714  self->mass = 400;
715 
716  self->pain = medic_pain;
717  self->die = medic_die;
718 
719  self->monsterinfo.stand = medic_stand;
720  self->monsterinfo.walk = medic_walk;
721  self->monsterinfo.run = medic_run;
722  self->monsterinfo.dodge = medic_dodge;
723  self->monsterinfo.attack = medic_attack;
724  self->monsterinfo.melee = NULL;
725  self->monsterinfo.sight = medic_sight;
726  self->monsterinfo.idle = medic_idle;
727  self->monsterinfo.search = medic_search;
728  self->monsterinfo.checkattack = medic_checkattack;
729 
730  gi.linkentity(self);
731 
732  self->monsterinfo.currentmove = &medic_move_stand;
733  self->monsterinfo.scale = MODEL_SCALE;
734 
735  walkmonster_start(self);
736 }

◆ 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 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 540 of file m_medic.c.

Referenced by medic_cable_attack().

◆ medic_frames_attackBlaster

mframe_t medic_frames_attackBlaster[]
Initial value:
= {
{ ai_charge, 0, NULL },
{ ai_charge, 5, NULL },
{ ai_charge, 5, NULL },
{ ai_charge, 3, NULL },
{ ai_charge, 2, 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 514 of file m_medic.c.

◆ medic_frames_attackCable

mframe_t medic_frames_attackCable[]
Initial value:
= {
{ ai_move, 2, NULL },
{ ai_move, 3, NULL },
{ ai_move, 5, NULL },
{ ai_move, 4.4, NULL },
{ ai_charge, 4.7, NULL },
{ ai_charge, 5, NULL },
{ ai_charge, 6, NULL },
{ ai_charge, 4, NULL },
{ ai_charge, 0, NULL },
{ ai_move, -1.5, NULL },
{ ai_move, -1.2, NULL },
{ ai_move, -3, NULL },
{ ai_move, -2, NULL },
{ ai_move, 0.3, NULL },
{ ai_move, 0.7, NULL },
{ ai_move, 1.2, NULL },
{ ai_move, 1.3, NULL }
}

Definition at line 632 of file m_medic.c.

◆ medic_frames_attackHyperBlaster

mframe_t medic_frames_attackHyperBlaster[]

◆ medic_frames_death

mframe_t medic_frames_death[]

Definition at line 361 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 454 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 272 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 284 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 238 of file m_medic.c.

◆ medic_frames_stand

mframe_t medic_frames_stand[]

Definition at line 115 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 216 of file m_medic.c.

◆ medic_move_attackBlaster

Definition at line 530 of file m_medic.c.

Referenced by medic_attack().

◆ medic_move_attackCable

Definition at line 662 of file m_medic.c.

Referenced by medic_attack().

◆ medic_move_attackHyperBlaster

Definition at line 503 of file m_medic.c.

Referenced by medic_continue().

◆ medic_move_death

Definition at line 393 of file m_medic.c.

Referenced by medic_die().

◆ medic_move_duck

Definition at line 472 of file m_medic.c.

Referenced by medic_dodge().

◆ medic_move_pain1

Definition at line 282 of file m_medic.c.

Referenced by medic_pain().

◆ medic_move_pain2

Definition at line 301 of file m_medic.c.

Referenced by medic_pain().

◆ medic_move_run

mmove_t medic_move_run = {FRAME_run1, FRAME_run6, medic_frames_run, NULL}

Definition at line 247 of file m_medic.c.

Referenced by medic_run().

◆ medic_move_stand

mmove_t medic_move_stand = {FRAME_wait1, FRAME_wait90, medic_frames_stand, NULL}

Definition at line 208 of file m_medic.c.

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

◆ medic_move_walk

mmove_t medic_move_walk = {FRAME_walk1, FRAME_walk12, medic_frames_walk, NULL}

Definition at line 230 of file m_medic.c.

Referenced by medic_walk().

◆ sound_die

int sound_die
static

Definition at line 35 of file m_medic.c.

Referenced by medic_die(), and SP_monster_medic().

◆ sound_hook_heal

int sound_hook_heal
static

Definition at line 40 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 39 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 38 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 41 of file m_medic.c.

Referenced by medic_hook_retract(), and SP_monster_medic().

◆ sound_idle1

int sound_idle1
static

Definition at line 32 of file m_medic.c.

Referenced by medic_idle(), and SP_monster_medic().

◆ sound_pain1

int sound_pain1
static

Definition at line 33 of file m_medic.c.

Referenced by medic_pain(), and SP_monster_medic().

◆ sound_pain2

int sound_pain2
static

Definition at line 34 of file m_medic.c.

Referenced by medic_pain(), and SP_monster_medic().

◆ sound_search

int sound_search
static

Definition at line 37 of file m_medic.c.

Referenced by medic_search(), and SP_monster_medic().

◆ sound_sight

int sound_sight
static

Definition at line 36 of file m_medic.c.

Referenced by medic_sight(), and SP_monster_medic().

gi
game_import_t gi
Definition: g_main.c:23
AI_RESURRECTING
#define AI_RESURRECTING
Definition: g_local.h:140
deathmatch
cvar_t * deathmatch
Definition: g_main.c:33
medic_attack
void medic_attack(edict_t *self)
Definition: m_medic.c:665
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
AI_MEDIC
#define AI_MEDIC
Definition: g_local.h:139
DEAD_DEAD
#define DEAD_DEAD
Definition: g_local.h:112
sound_die
static int sound_die
Definition: m_medic.c:35
ThrowGib
void ThrowGib(edict_t *self, char *gibname, int damage, int type)
Definition: g_misc.c:130
medic_checkattack
qboolean medic_checkattack(edict_t *self)
Definition: m_medic.c:673
ED_CallSpawn
void ED_CallSpawn(edict_t *ent)
Definition: g_spawn.c:340
ai_charge
void ai_charge(edict_t *self, float dist)
Definition: g_ai.c:175
AI_GOOD_GUY
#define AI_GOOD_GUY
Definition: g_local.h:134
sound_hook_heal
static int sound_hook_heal
Definition: m_medic.c:40
sound_search
static int sound_search
Definition: m_medic.c:37
medic_sight
void medic_sight(edict_t *self, edict_t *other)
Definition: m_medic.c:109
FRAME_attack28
#define FRAME_attack28
Definition: m_boss2.h:119
FRAME_attack43
#define FRAME_attack43
Definition: m_medic.h:241
sound_hook_hit
static int sound_hook_hit
Definition: m_medic.c:39
AI_STAND_GROUND
#define AI_STAND_GROUND
Definition: g_local.h:126
SpawnItem
void SpawnItem(edict_t *ent, gitem_t *item)
Definition: g_items.c:1003
MODEL_SCALE
#define MODEL_SCALE
Definition: m_actor.h:504
spawn_func_t::name
char * name
Definition: g_spawn.c:23
medic_hook_retract
void medic_hook_retract(edict_t *self)
Definition: m_medic.c:626
medic_run
void medic_run(edict_t *self)
Definition: m_medic.c:249
DAMAGE_YES
@ DAMAGE_YES
Definition: g_local.h:88
medic_duck_hold
void medic_duck_hold(edict_t *self)
Definition: m_medic.c:438
M_CheckAttack
qboolean M_CheckAttack(edict_t *self)
Definition: g_ai.c:553
g_edicts
edict_t * g_edicts
Definition: g_main.c:31
other
@ other
Definition: ogg.c:63
itemlist
gitem_t itemlist[]
Definition: g_items.c:1063
walkmonster_start
void walkmonster_start(edict_t *self)
Definition: g_monster.c:630
MOVETYPE_STEP
@ MOVETYPE_STEP
Definition: g_local.h:192
medic_move_pain2
mmove_t medic_move_pain2
Definition: m_medic.c:301
visible
qboolean visible(edict_t *self, edict_t *other)
Definition: g_ai.c:268
medic_cable_offsets
static vec3_t medic_cable_offsets[]
Definition: m_medic.c:540
sound_pain2
static int sound_pain2
Definition: m_medic.c:34
vec3_origin
vec3_t vec3_origin
Definition: shared.c:21
vectoangles
void vectoangles(vec3_t vec, vec3_t angles)
Definition: g_utils.c:330
medic_walk
void medic_walk(edict_t *self)
Definition: m_medic.c:232
findradius
edict_t * findradius(edict_t *from, vec3_t org, float rad)
Definition: g_utils.c:75
G_FreeEdict
void G_FreeEdict(edict_t *e)
Definition: g_utils.c:421
medic_duck_up
void medic_duck_up(edict_t *self)
Definition: m_medic.c:446
medic_pain
void medic_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: m_medic.c:303
sound_idle1
static int sound_idle1
Definition: m_medic.c:32
game_locals_t::num_items
int num_items
Definition: g_local.h:287
FRAME_attack12
#define FRAME_attack12
Definition: m_boss2.h:103
forward
static vec3_t forward
Definition: p_view.c:27
svc_temp_entity
#define svc_temp_entity
Definition: g_local.h:38
medic_move_stand
mmove_t medic_move_stand
Definition: m_medic.c:208
AI_HOLD_FRAME
#define AI_HOLD_FRAME
Definition: g_local.h:133
medic_move_attackHyperBlaster
mmove_t medic_move_attackHyperBlaster
Definition: m_medic.c:503
FRAME_attack19
#define FRAME_attack19
Definition: m_boss2.h:110
medic_move_walk
mmove_t medic_move_walk
Definition: m_medic.c:230
game
game_locals_t game
Definition: g_main.c:21
spawn_func_t
Definition: g_spawn.c:22
ai_walk
void ai_walk(edict_t *self, float dist)
Definition: g_ai.c:148
FRAME_attack9
#define FRAME_attack9
Definition: m_boss2.h:100
random
#define random()
Definition: g_local.h:504
FRAME_attack25
#define FRAME_attack25
Definition: m_boss2.h:116
medic_move_duck
mmove_t medic_move_duck
Definition: m_medic.c:472
AngleVectors
void AngleVectors(vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
Definition: shared.c:23
FRAME_attack22
#define FRAME_attack22
Definition: m_boss2.h:113
FoundTarget
void FoundTarget(edict_t *self)
Definition: g_ai.c:328
medic_idle
void medic_idle(edict_t *self)
Definition: m_medic.c:76
sound_hook_launch
static int sound_hook_launch
Definition: m_medic.c:38
sound_sight
static int sound_sight
Definition: m_medic.c:36
skill
cvar_t * skill
Definition: g_main.c:36
spawn_funcs
static const spawn_func_t spawn_funcs[]
Definition: g_spawn.c:150
medic_move_pain1
mmove_t medic_move_pain1
Definition: m_medic.c:282
medic_move_run
mmove_t medic_move_run
Definition: m_medic.c:247
ai_move
void ai_move(edict_t *self, float dist)
Definition: g_ai.c:86
medic_fire_blaster
void medic_fire_blaster(edict_t *self)
Definition: m_medic.c:325
level_locals_t::time
float time
Definition: g_local.h:299
monster_fire_blaster
void monster_fire_blaster(edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, int flashtype, int effect)
Definition: g_monster.c:49
medic_move_attackBlaster
mmove_t medic_move_attackBlaster
Definition: m_medic.c:530
medic_search
void medic_search(edict_t *self)
Definition: m_medic.c:91
DAMAGE_AIM
@ DAMAGE_AIM
Definition: g_local.h:89
medic_hook_launch
void medic_hook_launch(edict_t *self)
Definition: m_medic.c:533
medic_move_attackCable
mmove_t medic_move_attackCable
Definition: m_medic.c:662
right
static vec3_t right
Definition: p_view.c:27
ai_run
void ai_run(edict_t *self, float dist)
Definition: g_ai.c:821
GIB_ORGANIC
#define GIB_ORGANIC
Definition: g_local.h:122
level
level_locals_t level
Definition: g_main.c:22
medic_dodge
void medic_dodge(edict_t *self, edict_t *attacker, float eta)
Definition: m_medic.c:474
FRAME_attack42
#define FRAME_attack42
Definition: m_medic.h:240
medic_duck_down
void medic_duck_down(edict_t *self)
Definition: m_medic.c:427
monster_flash_offset
const vec3_t monster_flash_offset[256]
Definition: m_flash.c:25
sound_hook_retract
static int sound_hook_retract
Definition: m_medic.c:41
ThrowHead
void ThrowHead(edict_t *self, char *gibname, int damage, int type)
Definition: g_misc.c:175
medic_stand
void medic_stand(edict_t *self)
Definition: m_medic.c:210
sound_pain1
static int sound_pain1
Definition: m_medic.c:33
medic_move_death
mmove_t medic_move_death
Definition: m_medic.c:393
medic_continue
void medic_continue(edict_t *self)
Definition: m_medic.c:506
MOVETYPE_TOSS
@ MOVETYPE_TOSS
Definition: g_local.h:194
medic_die
void medic_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: m_medic.c:395
AI_DUCKED
#define AI_DUCKED
Definition: g_local.h:137
medic_cable_attack
void medic_cable_attack(edict_t *self)
Definition: m_medic.c:553
FRAME_attack44
#define FRAME_attack44
Definition: m_medic.h:242
medic_FindDeadMonster
edict_t * medic_FindDeadMonster(edict_t *self)
Definition: m_medic.c:44
FRAME_attack50
#define FRAME_attack50
Definition: m_medic.h:248
spawn_func_t::spawn
void(* spawn)(edict_t *ent)
Definition: g_spawn.c:24
gitem_s::classname
char * classname
Definition: g_local.h:233
gitem_s
Definition: g_local.h:232