Quake II RTX doxygen
1.0 dev
|
|
#include "g_local.h"
#include "m_medic.h"
Go to the source code of this file.
|
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) |
|
|
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} |
|
◆ ED_CallSpawn()
void ED_CallSpawn |
( |
edict_t * |
ent | ) |
|
Definition at line 340 of file g_spawn.c.
346 if (!ent->classname) {
347 gi.dprintf(
"ED_CallSpawn: NULL classname\n");
355 if (!strcmp(item->
classname, ent->classname)) {
364 if (!strcmp(s->
name, ent->classname)) {
370 gi.dprintf(
"%s doesn't have a spawn function\n", ent->classname);
Referenced by medic_cable_attack(), and SpawnEntities().
◆ medic_attack()
void medic_attack |
( |
edict_t * |
self | ) |
|
◆ medic_cable_attack()
void medic_cable_attack |
( |
edict_t * |
self | ) |
|
Definition at line 553 of file m_medic.c.
555 vec3_t offset, start, end, f, r;
560 if (!self->enemy->inuse)
568 VectorSubtract(start, self->enemy->s.origin, dir);
569 distance = VectorLength(dir);
575 if (angles[0] < -180)
577 if (fabs(angles[0]) > 45)
580 tr =
gi.trace(start, NULL, NULL, self->enemy->s.origin,
self, MASK_SHOT);
581 if (tr.fraction != 1.0 && tr.ent != self->enemy)
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;
596 self->enemy->owner = NULL;
597 if (self->enemy->think) {
599 self->enemy->think(self->enemy);
602 if (self->oldenemy && self->oldenemy->client) {
603 self->enemy->enemy =
self->oldenemy;
612 VectorMA(start, 8, f, start);
615 VectorCopy(self->enemy->s.origin, end);
616 end[2] =
self->enemy->absmin[2] +
self->enemy->size[2] / 2;
619 gi.WriteByte(TE_MEDIC_CABLE_ATTACK);
621 gi.WritePosition(start);
622 gi.WritePosition(end);
623 gi.multicast(self->s.origin, MULTICAST_PVS);
◆ medic_checkattack()
qboolean medic_checkattack |
( |
edict_t * |
self | ) |
|
◆ medic_continue()
void medic_continue |
( |
edict_t * |
self | ) |
|
◆ medic_dead()
void medic_dead |
( |
edict_t * |
self | ) |
|
Definition at line 351 of file m_medic.c.
353 VectorSet(self->mins, -16, -16, -24);
354 VectorSet(self->maxs, 16, 16, -8);
356 self->svflags |= SVF_DEADMONSTER;
◆ 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.
400 if ((self->enemy) && (self->enemy->owner ==
self))
401 self->enemy->owner = NULL;
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++)
408 for (n = 0; n < 4; n++)
419 gi.sound(
self, CHAN_VOICE,
sound_die, 1, ATTN_NORM, 0);
Referenced by SP_monster_medic().
◆ medic_dodge()
void medic_dodge |
( |
edict_t * |
self, |
|
|
edict_t * |
attacker, |
|
|
float |
eta |
|
) |
| |
◆ medic_duck_down()
void medic_duck_down |
( |
edict_t * |
self | ) |
|
◆ medic_duck_hold()
void medic_duck_hold |
( |
edict_t * |
self | ) |
|
◆ medic_duck_up()
void medic_duck_up |
( |
edict_t * |
self | ) |
|
◆ medic_FindDeadMonster()
edict_t* medic_FindDeadMonster |
( |
edict_t * |
self | ) |
|
◆ medic_fire_blaster()
void medic_fire_blaster |
( |
edict_t * |
self | ) |
|
Definition at line 325 of file m_medic.c.
336 effect = EF_HYPERBLASTER;
343 VectorCopy(self->enemy->s.origin, end);
344 end[2] +=
self->enemy->viewheight;
345 VectorSubtract(end, start, dir);
◆ medic_hook_launch()
void medic_hook_launch |
( |
edict_t * |
self | ) |
|
◆ medic_hook_retract()
void medic_hook_retract |
( |
edict_t * |
self | ) |
|
◆ medic_idle()
void medic_idle |
( |
edict_t * |
self | ) |
|
◆ medic_pain()
void medic_pain |
( |
edict_t * |
self, |
|
|
edict_t * |
other, |
|
|
float |
kick, |
|
|
int |
damage |
|
) |
| |
◆ medic_run()
void medic_run |
( |
edict_t * |
self | ) |
|
Definition at line 249 of file m_medic.c.
251 if (!(self->monsterinfo.aiflags &
AI_MEDIC)) {
256 self->oldenemy =
self->enemy;
258 self->enemy->owner =
self;
259 self->monsterinfo.aiflags |=
AI_MEDIC;
Referenced by SP_monster_medic().
◆ medic_search()
void medic_search |
( |
edict_t * |
self | ) |
|
Definition at line 91 of file m_medic.c.
97 if (!self->oldenemy) {
100 self->oldenemy =
self->enemy;
102 self->enemy->owner =
self;
103 self->monsterinfo.aiflags |=
AI_MEDIC;
Referenced by SP_monster_medic().
◆ medic_sight()
void medic_sight |
( |
edict_t * |
self, |
|
|
edict_t * |
other |
|
) |
| |
◆ medic_stand()
void medic_stand |
( |
edict_t * |
self | ) |
|
◆ medic_walk()
void medic_walk |
( |
edict_t * |
self | ) |
|
◆ SP_monster_medic()
void SP_monster_medic |
( |
edict_t * |
self | ) |
|
Definition at line 686 of file m_medic.c.
704 gi.soundindex(
"medic/medatck1.wav");
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);
713 self->gib_health = -130;
724 self->monsterinfo.melee = NULL;
◆ visible()
qboolean visible |
( |
edict_t * |
self, |
|
|
edict_t * |
other |
|
) |
| |
◆ 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
◆ medic_frames_attackCable
◆ medic_frames_attackHyperBlaster
mframe_t medic_frames_attackHyperBlaster[] |
◆ medic_frames_death
◆ medic_frames_duck
◆ medic_frames_pain1
◆ medic_frames_pain2
◆ medic_frames_run
◆ medic_frames_stand
◆ medic_frames_walk
◆ medic_move_attackBlaster
◆ medic_move_attackCable
◆ medic_move_attackHyperBlaster
◆ medic_move_death
◆ medic_move_duck
◆ medic_move_pain1
◆ medic_move_pain2
◆ medic_move_run
◆ medic_move_stand
◆ medic_move_walk
◆ sound_die
◆ sound_hook_heal
◆ sound_hook_hit
◆ sound_hook_launch
◆ sound_hook_retract
◆ sound_idle1
◆ sound_pain1
◆ sound_pain2
◆ sound_search
◆ sound_sight
void medic_attack(edict_t *self)
void G_ProjectSource(const vec3_t point, const vec3_t distance, const vec3_t forward, const vec3_t right, vec3_t result)
void ThrowGib(edict_t *self, char *gibname, int damage, int type)
qboolean medic_checkattack(edict_t *self)
void ED_CallSpawn(edict_t *ent)
void ai_charge(edict_t *self, float dist)
static int sound_hook_heal
void medic_sight(edict_t *self, edict_t *other)
static int sound_hook_hit
void SpawnItem(edict_t *ent, gitem_t *item)
void medic_hook_retract(edict_t *self)
void medic_run(edict_t *self)
void medic_duck_hold(edict_t *self)
qboolean M_CheckAttack(edict_t *self)
void walkmonster_start(edict_t *self)
qboolean visible(edict_t *self, edict_t *other)
static vec3_t medic_cable_offsets[]
void vectoangles(vec3_t vec, vec3_t angles)
void medic_walk(edict_t *self)
edict_t * findradius(edict_t *from, vec3_t org, float rad)
void G_FreeEdict(edict_t *e)
void medic_duck_up(edict_t *self)
void medic_pain(edict_t *self, edict_t *other, float kick, int damage)
mmove_t medic_move_attackHyperBlaster
void ai_walk(edict_t *self, float dist)
void AngleVectors(vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
void FoundTarget(edict_t *self)
void medic_idle(edict_t *self)
static int sound_hook_launch
static const spawn_func_t spawn_funcs[]
void ai_move(edict_t *self, float dist)
void medic_fire_blaster(edict_t *self)
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
void medic_search(edict_t *self)
void medic_hook_launch(edict_t *self)
mmove_t medic_move_attackCable
void ai_run(edict_t *self, float dist)
void medic_dodge(edict_t *self, edict_t *attacker, float eta)
void medic_duck_down(edict_t *self)
const vec3_t monster_flash_offset[256]
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)
void medic_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
void medic_cable_attack(edict_t *self)
edict_t * medic_FindDeadMonster(edict_t *self)
void(* spawn)(edict_t *ent)