Go to the documentation of this file.
107 self->oldenemy =
self->enemy;
261 if (!(self->monsterinfo.aiflags &
AI_MEDIC))
268 self->oldenemy =
self->enemy;
319 if (self->health < (self->max_health / 2))
322 if (
level.time < self->pain_debounce_time)
325 self->pain_debounce_time =
level.time + 3;
361 end[2] +=
self->enemy->viewheight;
418 if ((self->enemy) && (self->enemy->owner ==
self))
419 self->enemy->owner =
NULL;
422 if (self->health <= self->gib_health)
425 for (n= 0; n < 2; n++)
427 for (n= 0; n < 4; n++)
448 if (self->monsterinfo.aiflags &
AI_DUCKED)
453 self->monsterinfo.pausetime =
level.time + 1;
459 if (
level.time >= self->monsterinfo.pausetime)
500 self->enemy = attacker;
529 if (
visible (
self, self->enemy) )
578 vec3_t offset, start, end, f,
r;
583 if (!self->enemy->inuse)
598 if (angles[0] < -180)
600 if (fabs(angles[0]) > 45)
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;
622 self->enemy->owner =
NULL;
623 if (self->enemy->think)
625 self->enemy->nextthink =
level.time;
626 self->enemy->think (self->enemy);
629 if (self->oldenemy && self->oldenemy->client)
631 self->enemy->enemy =
self->oldenemy;
646 end[2] =
self->enemy->absmin[2] +
self->enemy->size[2] / 2;
698 if (self->monsterinfo.aiflags &
AI_MEDIC)
706 if (self->monsterinfo.aiflags &
AI_MEDIC)
741 self->s.modelindex =
gi.
modelindex (
"models/monsters/medic/tris.md2");
746 self->gib_health = -130;
757 self->monsterinfo.melee =
NULL;
void G_ProjectSource(vec3_t point, vec3_t distance, vec3_t forward, vec3_t right, vec3_t result)
void medic_attack(edict_t *self)
trace_t(* trace)(vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, edict_t *passent, int contentmask)
void ThrowGib(edict_t *self, char *gibname, int damage, int type)
qboolean medic_checkattack(edict_t *self)
#define VectorSubtract(a, b, c)
void ED_CallSpawn(edict_t *ent)
void ai_charge(edict_t *self, float dist)
void(* WritePosition)(vec3_t pos)
void(* multicast)(vec3_t origin, multicast_t to)
static int sound_hook_heal
void medic_sight(edict_t *self, edict_t *other)
mframe_t medic_frames_duck[]
static int sound_hook_hit
mframe_t medic_frames_attackBlaster[]
void medic_hook_retract(edict_t *self)
void medic_run(edict_t *self)
void(* sound)(edict_t *ent, int channel, int soundindex, float volume, float attenuation, float timeofs)
void medic_duck_hold(edict_t *self)
qboolean M_CheckAttack(edict_t *self)
mframe_t medic_frames_attackCable[]
void walkmonster_start(edict_t *self)
qboolean visible(edict_t *self, edict_t *other)
#define MZ2_MEDIC_BLASTER_1
static vec3_t medic_cable_offsets[]
void AngleVectors(vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
vec3_t monster_flash_offset[]
void vectoangles(vec3_t vec, vec3_t angles)
void medic_walk(edict_t *self)
mframe_t medic_frames_pain1[]
edict_t * findradius(edict_t *from, vec3_t org, float rad)
void G_FreeEdict(edict_t *e)
mframe_t medic_frames_walk[]
void medic_duck_up(edict_t *self)
void medic_pain(edict_t *self, edict_t *other, float kick, int damage)
int(* soundindex)(char *name)
vec_t VectorLength(vec3_t v)
mmove_t medic_move_attackHyperBlaster
int(* modelindex)(char *name)
void ai_walk(edict_t *self, float dist)
void SP_monster_medic(edict_t *self)
void medic_dead(edict_t *self)
void FoundTarget(edict_t *self)
void medic_idle(edict_t *self)
static int sound_hook_launch
mframe_t medic_frames_run[]
void ai_move(edict_t *self, float dist)
void medic_fire_blaster(edict_t *self)
void(* WriteShort)(int c)
void monster_fire_blaster(edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, int flashtype, int effect)
mmove_t medic_move_attackBlaster
monsterinfo_t monsterinfo
void medic_search(edict_t *self)
mframe_t medic_frames_attackHyperBlaster[]
void medic_hook_launch(edict_t *self)
mmove_t medic_move_attackCable
void ai_run(edict_t *self, float dist)
void VectorMA(vec3_t veca, float scale, vec3_t vecb, vec3_t vecc)
void medic_dodge(edict_t *self, edict_t *attacker, float eta)
mframe_t medic_frames_death[]
void medic_duck_down(edict_t *self)
static int sound_hook_retract
void ThrowHead(edict_t *self, char *gibname, int damage, int type)
void medic_stand(edict_t *self)
void medic_continue(edict_t *self)
#define VectorSet(v, x, y, z)
void medic_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
void(* linkentity)(edict_t *ent)
mframe_t medic_frames_pain2[]
void medic_cable_attack(edict_t *self)
mframe_t medic_frames_stand[]
void ai_stand(edict_t *self, float dist)
edict_t * medic_FindDeadMonster(edict_t *self)