Quake II RTX doxygen
1.0 dev
|
|
#include "g_local.h"
#include "m_actor.h"
Go to the source code of this file.
|
void | actor_stand (edict_t *self) |
|
void | actor_walk (edict_t *self) |
|
void | actor_run (edict_t *self) |
|
void | actor_pain (edict_t *self, edict_t *other, float kick, int damage) |
|
void | actorMachineGun (edict_t *self) |
|
void | actor_dead (edict_t *self) |
|
void | actor_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point) |
|
void | actor_fire (edict_t *self) |
|
void | actor_attack (edict_t *self) |
|
void | actor_use (edict_t *self, edict_t *other, edict_t *activator) |
|
void | SP_misc_actor (edict_t *self) |
|
void | target_actor_touch (edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf) |
|
void | SP_target_actor (edict_t *self) |
|
|
char * | actor_names [MAX_ACTOR_NAMES] |
|
mframe_t | actor_frames_stand [] |
|
mmove_t | actor_move_stand = {FRAME_stand101, FRAME_stand140, actor_frames_stand, NULL} |
|
mframe_t | actor_frames_walk [] |
|
mmove_t | actor_move_walk = {FRAME_walk01, FRAME_walk08, actor_frames_walk, NULL} |
|
mframe_t | actor_frames_run [] |
|
mmove_t | actor_move_run = {FRAME_run02, FRAME_run07, actor_frames_run, NULL} |
|
mframe_t | actor_frames_pain1 [] |
|
mmove_t | actor_move_pain1 = {FRAME_pain101, FRAME_pain103, actor_frames_pain1, actor_run} |
|
mframe_t | actor_frames_pain2 [] |
|
mmove_t | actor_move_pain2 = {FRAME_pain201, FRAME_pain203, actor_frames_pain2, actor_run} |
|
mframe_t | actor_frames_pain3 [] |
|
mmove_t | actor_move_pain3 = {FRAME_pain301, FRAME_pain303, actor_frames_pain3, actor_run} |
|
mframe_t | actor_frames_flipoff [] |
|
mmove_t | actor_move_flipoff = {FRAME_flip01, FRAME_flip14, actor_frames_flipoff, actor_run} |
|
mframe_t | actor_frames_taunt [] |
|
mmove_t | actor_move_taunt = {FRAME_taunt01, FRAME_taunt17, actor_frames_taunt, actor_run} |
|
char * | messages [] |
|
mframe_t | actor_frames_death1 [] |
|
mmove_t | actor_move_death1 = {FRAME_death101, FRAME_death107, actor_frames_death1, actor_dead} |
|
mframe_t | actor_frames_death2 [] |
|
mmove_t | actor_move_death2 = {FRAME_death201, FRAME_death213, actor_frames_death2, actor_dead} |
|
mframe_t | actor_frames_attack [] |
|
mmove_t | actor_move_attack = {FRAME_attak01, FRAME_attak04, actor_frames_attack, actor_run} |
|
◆ MAX_ACTOR_NAMES
#define MAX_ACTOR_NAMES 8 |
◆ actor_attack()
void actor_attack |
( |
edict_t * |
self | ) |
|
◆ actor_dead()
void actor_dead |
( |
edict_t * |
self | ) |
|
Definition at line 278 of file m_actor.c.
280 VectorSet(self->mins, -16, -16, -24);
281 VectorSet(self->maxs, 16, 16, -8);
283 self->svflags |= SVF_DEADMONSTER;
◆ actor_die()
void actor_die |
( |
edict_t * |
self, |
|
|
edict_t * |
inflictor, |
|
|
edict_t * |
attacker, |
|
|
int |
damage, |
|
|
vec3_t |
point |
|
) |
| |
Definition at line 316 of file m_actor.c.
321 if (self->health <= -80) {
323 for (n = 0; n < 2; n++)
325 for (n = 0; n < 4; n++)
Referenced by SP_misc_actor().
◆ actor_fire()
void actor_fire |
( |
edict_t * |
self | ) |
|
◆ actor_pain()
void actor_pain |
( |
edict_t * |
self, |
|
|
edict_t * |
other, |
|
|
float |
kick, |
|
|
int |
damage |
|
) |
| |
Definition at line 216 of file m_actor.c.
220 if (self->health < (self->max_health / 2))
223 if (
level.
time < self->pain_debounce_time)
226 self->pain_debounce_time =
level.
time + 3;
233 VectorSubtract(
other->s.origin, self->s.origin, v);
240 gi.cprintf(
other, PRINT_CHAT,
"%s: %s!\n", name,
messages[rand() % 3]);
Referenced by SP_misc_actor().
◆ actor_run()
void actor_run |
( |
edict_t * |
self | ) |
|
◆ actor_stand()
void actor_stand |
( |
edict_t * |
self | ) |
|
◆ actor_use()
void actor_use |
( |
edict_t * |
self, |
|
|
edict_t * |
other, |
|
|
edict_t * |
activator |
|
) |
| |
Definition at line 376 of file m_actor.c.
380 self->goalentity =
self->movetarget =
G_PickTarget(self->target);
381 if ((!self->movetarget) || (strcmp(self->movetarget->classname,
"target_actor") != 0)) {
382 gi.dprintf(
"%s has bad target %s at %s\n", self->classname, self->target,
vtos(self->s.origin));
384 self->monsterinfo.pausetime = 100000000;
385 self->monsterinfo.stand(
self);
389 VectorSubtract(self->goalentity->s.origin, self->s.origin, v);
390 self->ideal_yaw =
self->s.angles[YAW] =
vectoyaw(v);
391 self->monsterinfo.walk(
self);
Referenced by SP_misc_actor().
◆ actor_walk()
void actor_walk |
( |
edict_t * |
self | ) |
|
◆ actorMachineGun()
void actorMachineGun |
( |
edict_t * |
self | ) |
|
Definition at line 254 of file m_actor.c.
256 vec3_t start, target;
262 if (self->enemy->health > 0) {
263 VectorMA(self->enemy->s.origin, -0.2, self->enemy->velocity, target);
264 target[2] +=
self->enemy->viewheight;
266 VectorCopy(self->enemy->absmin, target);
267 target[2] += (
self->enemy->size[2] / 2);
269 VectorSubtract(target, start,
forward);
Referenced by actor_fire().
◆ SP_misc_actor()
void SP_misc_actor |
( |
edict_t * |
self | ) |
|
Definition at line 399 of file m_actor.c.
406 if (!self->targetname) {
407 gi.dprintf(
"untargeted %s at %s\n", self->classname,
vtos(self->s.origin));
413 gi.dprintf(
"%s with no target at %s\n", self->classname,
vtos(self->s.origin));
419 self->solid = SOLID_BBOX;
420 self->s.modelindex =
gi.modelindex(
"players/male/tris.md2");
421 VectorSet(self->mins, -16, -16, -24);
422 VectorSet(self->maxs, 16, 16, 32);
435 self->monsterinfo.melee = NULL;
436 self->monsterinfo.sight = NULL;
◆ SP_target_actor()
void SP_target_actor |
( |
edict_t * |
self | ) |
|
Definition at line 541 of file m_actor.c.
543 if (!self->targetname)
544 gi.dprintf(
"%s with no targetname at %s\n", self->classname,
vtos(self->s.origin));
546 self->solid = SOLID_TRIGGER;
548 VectorSet(self->mins, -8, -8, -8);
549 VectorSet(self->maxs, 8, 8, 8);
550 self->svflags = SVF_NOCLIENT;
552 if (self->spawnflags & 1) {
557 if (self->s.angles[YAW] == 0)
558 self->s.angles[YAW] = 360;
◆ target_actor_touch()
void target_actor_touch |
( |
edict_t * |
self, |
|
|
edict_t * |
other, |
|
|
cplane_t * |
plane, |
|
|
csurface_t * |
surf |
|
) |
| |
Definition at line 467 of file m_actor.c.
471 if (
other->movetarget !=
self)
491 if (self->spawnflags & 1) {
492 other->velocity[0] =
self->movedir[0] *
self->speed;
493 other->velocity[1] =
self->movedir[1] *
self->speed;
495 if (
other->groundentity) {
496 other->groundentity = NULL;
497 other->velocity[2] =
self->movedir[2];
498 gi.sound(
other, CHAN_VOICE,
gi.soundindex(
"player/male/jump1.wav"), 1, ATTN_NORM, 0);
502 if (self->spawnflags & 2) {
503 }
else if (self->spawnflags & 4) {
507 if (self->spawnflags & 32)
509 if (self->spawnflags & 16) {
518 if (!(self->spawnflags & 6) && (self->pathtarget)) {
521 savetarget =
self->target;
522 self->target =
self->pathtarget;
524 self->target = savetarget;
529 if (!
other->goalentity)
535 }
else if (
other->movetarget ==
other->goalentity) {
536 VectorSubtract(
other->movetarget->s.origin,
other->s.origin, v);
Referenced by SP_target_actor().
◆ actor_frames_attack
◆ actor_frames_death1
◆ actor_frames_death2
◆ actor_frames_flipoff
◆ actor_frames_pain1
◆ actor_frames_pain2
◆ actor_frames_pain3
◆ actor_frames_run
◆ actor_frames_stand
◆ actor_frames_taunt
◆ actor_frames_walk
Initial value:
Definition at line 93 of file m_actor.c.
◆ actor_move_attack
◆ actor_move_death1
◆ actor_move_death2
◆ actor_move_flipoff
◆ actor_move_pain1
◆ actor_move_pain2
◆ actor_move_pain3
◆ actor_move_run
◆ actor_move_stand
◆ actor_move_taunt
◆ actor_move_walk
◆ actor_names
◆ messages
Initial value:= {
"Watch it",
"#$@*&",
"Idiot",
"Check your targets"
}
Definition at line 209 of file m_actor.c.
Referenced by actor_pain().
void G_ProjectSource(const vec3_t point, const vec3_t distance, const vec3_t forward, const vec3_t right, vec3_t result)
#define DEFAULT_BULLET_HSPREAD
void ThrowGib(edict_t *self, char *gibname, int damage, int type)
void ai_charge(edict_t *self, float dist)
void actor_pain(edict_t *self, edict_t *other, float kick, int damage)
void actor_run(edict_t *self)
void actor_walk(edict_t *self)
mmove_t actor_move_flipoff
mmove_t actor_move_death2
mmove_t actor_move_attack
void actor_attack(edict_t *self)
float vectoyaw(vec3_t vec)
void actor_fire(edict_t *self)
void ai_turn(edict_t *self, float dist)
void walkmonster_start(edict_t *self)
char * actor_names[MAX_ACTOR_NAMES]
#define DEFAULT_BULLET_VSPREAD
void G_FreeEdict(edict_t *e)
void actorMachineGun(edict_t *self)
void actor_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
void ai_walk(edict_t *self, float dist)
void AngleVectors(vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
void actor_use(edict_t *self, edict_t *other, edict_t *activator)
mmove_t actor_move_death1
void monster_fire_bullet(edict_t *self, vec3_t start, vec3_t dir, int damage, int kick, int hspread, int vspread, int flashtype)
void ai_move(edict_t *self, float dist)
void ai_run(edict_t *self, float dist)
void G_UseTargets(edict_t *ent, edict_t *activator)
const vec3_t monster_flash_offset[256]
void G_SetMovedir(vec3_t angles, vec3_t movedir)
void ThrowHead(edict_t *self, char *gibname, int damage, int type)
edict_t * G_PickTarget(char *targetname)
void actor_stand(edict_t *self)
vec_t VectorNormalize(vec3_t v)
void target_actor_touch(edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)