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

Go to the source code of this file.

Macros

#define MAX_ACTOR_NAMES   8
 

Functions

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)
 

Variables

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}
 

Macro Definition Documentation

◆ MAX_ACTOR_NAMES

#define MAX_ACTOR_NAMES   8

Definition at line 25 of file m_actor.c.

Function Documentation

◆ actor_attack()

void actor_attack ( edict_t self)

Definition at line 391 of file m_actor.c.

392 {
393  int n;
394 
395  self->monsterinfo.currentmove = &actor_move_attack;
396  n = (rand() & 15) + 3 + 7;
397  self->monsterinfo.pausetime = level.time + n * FRAMETIME;
398 }

Referenced by SP_misc_actor().

◆ actor_dead()

void actor_dead ( edict_t self)

Definition at line 299 of file m_actor.c.

300 {
301  VectorSet (self->mins, -16, -16, -24);
302  VectorSet (self->maxs, 16, 16, -8);
303  self->movetype = MOVETYPE_TOSS;
304  self->svflags |= SVF_DEADMONSTER;
305  self->nextthink = 0;
306  gi.linkentity (self);
307 }

◆ actor_die()

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

Definition at line 339 of file m_actor.c.

340 {
341  int n;
342 
343 // check for gib
344  if (self->health <= -80)
345  {
346 // gi.sound (self, CHAN_VOICE, actor.sound_gib, 1, ATTN_NORM, 0);
347  for (n= 0; n < 2; n++)
348  ThrowGib (self, "models/objects/gibs/bone/tris.md2", damage, GIB_ORGANIC);
349  for (n= 0; n < 4; n++)
350  ThrowGib (self, "models/objects/gibs/sm_meat/tris.md2", damage, GIB_ORGANIC);
351  ThrowHead (self, "models/objects/gibs/head2/tris.md2", damage, GIB_ORGANIC);
352  self->deadflag = DEAD_DEAD;
353  return;
354  }
355 
356  if (self->deadflag == DEAD_DEAD)
357  return;
358 
359 // regular death
360 // gi.sound (self, CHAN_VOICE, actor.sound_die, 1, ATTN_NORM, 0);
361  self->deadflag = DEAD_DEAD;
362  self->takedamage = DAMAGE_YES;
363 
364  n = rand() % 2;
365  if (n == 0)
366  self->monsterinfo.currentmove = &actor_move_death1;
367  else
368  self->monsterinfo.currentmove = &actor_move_death2;
369 }

Referenced by SP_misc_actor().

◆ actor_fire()

void actor_fire ( edict_t self)

Definition at line 372 of file m_actor.c.

373 {
374  actorMachineGun (self);
375 
376  if (level.time >= self->monsterinfo.pausetime)
377  self->monsterinfo.aiflags &= ~AI_HOLD_FRAME;
378  else
379  self->monsterinfo.aiflags |= AI_HOLD_FRAME;
380 }

◆ actor_pain()

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

Definition at line 230 of file m_actor.c.

231 {
232  int n;
233 
234  if (self->health < (self->max_health / 2))
235  self->s.skinnum = 1;
236 
237  if (level.time < self->pain_debounce_time)
238  return;
239 
240  self->pain_debounce_time = level.time + 3;
241 // gi.sound (self, CHAN_VOICE, actor.sound_pain, 1, ATTN_NORM, 0);
242 
243  if ((other->client) && (random() < 0.4))
244  {
245  vec3_t v;
246  char *name;
247 
248  VectorSubtract (other->s.origin, self->s.origin, v);
249  self->ideal_yaw = vectoyaw (v);
250  if (random() < 0.5)
251  self->monsterinfo.currentmove = &actor_move_flipoff;
252  else
253  self->monsterinfo.currentmove = &actor_move_taunt;
255  gi.cprintf (other, PRINT_CHAT, "%s: %s!\n", name, messages[rand()%3]);
256  return;
257  }
258 
259  n = rand() % 3;
260  if (n == 0)
261  self->monsterinfo.currentmove = &actor_move_pain1;
262  else if (n == 1)
263  self->monsterinfo.currentmove = &actor_move_pain2;
264  else
265  self->monsterinfo.currentmove = &actor_move_pain3;
266 }

Referenced by SP_misc_actor().

◆ actor_run()

void actor_run ( edict_t self)

Definition at line 136 of file m_actor.c.

137 {
138  if ((level.time < self->pain_debounce_time) && (!self->enemy))
139  {
140  if (self->movetarget)
141  actor_walk(self);
142  else
143  actor_stand(self);
144  return;
145  }
146 
147  if (self->monsterinfo.aiflags & AI_STAND_GROUND)
148  {
149  actor_stand(self);
150  return;
151  }
152 
153  self->monsterinfo.currentmove = &actor_move_run;
154 }

Referenced by SP_misc_actor(), and target_actor_touch().

◆ actor_stand()

void actor_stand ( edict_t self)

Definition at line 87 of file m_actor.c.

88 {
89  self->monsterinfo.currentmove = &actor_move_stand;
90 
91  // randomize on startup
92  if (level.time < 1.0)
93  self->s.frame = self->monsterinfo.currentmove->firstframe + (rand() % (self->monsterinfo.currentmove->lastframe - self->monsterinfo.currentmove->firstframe + 1));
94 }

Referenced by actor_run(), SP_misc_actor(), and target_actor_touch().

◆ actor_use()

void actor_use ( edict_t self,
edict_t other,
edict_t activator 
)

Definition at line 401 of file m_actor.c.

402 {
403  vec3_t v;
404 
405  self->goalentity = self->movetarget = G_PickTarget(self->target);
406  if ((!self->movetarget) || (strcmp(self->movetarget->classname, "target_actor") != 0))
407  {
408  gi.dprintf ("%s has bad target %s at %s\n", self->classname, self->target, vtos(self->s.origin));
409  self->target = NULL;
410  self->monsterinfo.pausetime = 100000000;
411  self->monsterinfo.stand (self);
412  return;
413  }
414 
415  VectorSubtract (self->goalentity->s.origin, self->s.origin, v);
416  self->ideal_yaw = self->s.angles[YAW] = vectoyaw(v);
417  self->monsterinfo.walk (self);
418  self->target = NULL;
419 }

Referenced by SP_misc_actor().

◆ actor_walk()

void actor_walk ( edict_t self)

Definition at line 113 of file m_actor.c.

114 {
115  self->monsterinfo.currentmove = &actor_move_walk;
116 }

Referenced by actor_run(), and SP_misc_actor().

◆ actorMachineGun()

void actorMachineGun ( edict_t self)

Definition at line 269 of file m_actor.c.

270 {
271  vec3_t start, target;
273 
274  AngleVectors (self->s.angles, forward, right, NULL);
276  if (self->enemy)
277  {
278  if (self->enemy->health > 0)
279  {
280  VectorMA (self->enemy->s.origin, -0.2, self->enemy->velocity, target);
281  target[2] += self->enemy->viewheight;
282  }
283  else
284  {
285  VectorCopy (self->enemy->absmin, target);
286  target[2] += (self->enemy->size[2] / 2);
287  }
288  VectorSubtract (target, start, forward);
290  }
291  else
292  {
293  AngleVectors (self->s.angles, forward, NULL, NULL);
294  }
296 }

Referenced by actor_fire().

◆ SP_misc_actor()

void SP_misc_actor ( edict_t self)

Definition at line 425 of file m_actor.c.

426 {
427  if (deathmatch->value)
428  {
429  G_FreeEdict (self);
430  return;
431  }
432 
433  if (!self->targetname)
434  {
435  gi.dprintf("untargeted %s at %s\n", self->classname, vtos(self->s.origin));
436  G_FreeEdict (self);
437  return;
438  }
439 
440  if (!self->target)
441  {
442  gi.dprintf("%s with no target at %s\n", self->classname, vtos(self->s.origin));
443  G_FreeEdict (self);
444  return;
445  }
446 
447  self->movetype = MOVETYPE_STEP;
448  self->solid = SOLID_BBOX;
449  self->s.modelindex = gi.modelindex("players/male/tris.md2");
450  VectorSet (self->mins, -16, -16, -24);
451  VectorSet (self->maxs, 16, 16, 32);
452 
453  if (!self->health)
454  self->health = 100;
455  self->mass = 200;
456 
457  self->pain = actor_pain;
458  self->die = actor_die;
459 
460  self->monsterinfo.stand = actor_stand;
461  self->monsterinfo.walk = actor_walk;
462  self->monsterinfo.run = actor_run;
463  self->monsterinfo.attack = actor_attack;
464  self->monsterinfo.melee = NULL;
465  self->monsterinfo.sight = NULL;
466 
467  self->monsterinfo.aiflags |= AI_GOOD_GUY;
468 
469  gi.linkentity (self);
470 
471  self->monsterinfo.currentmove = &actor_move_stand;
472  self->monsterinfo.scale = MODEL_SCALE;
473 
474  walkmonster_start (self);
475 
476  // actors always start in a dormant state, they *must* be used to get going
477  self->use = actor_use;
478 }

◆ SP_target_actor()

void SP_target_actor ( edict_t self)

Definition at line 585 of file m_actor.c.

586 {
587  if (!self->targetname)
588  gi.dprintf ("%s with no targetname at %s\n", self->classname, vtos(self->s.origin));
589 
590  self->solid = SOLID_TRIGGER;
591  self->touch = target_actor_touch;
592  VectorSet (self->mins, -8, -8, -8);
593  VectorSet (self->maxs, 8, 8, 8);
594  self->svflags = SVF_NOCLIENT;
595 
596  if (self->spawnflags & 1)
597  {
598  if (!self->speed)
599  self->speed = 200;
600  if (!st.height)
601  st.height = 200;
602  if (self->s.angles[YAW] == 0)
603  self->s.angles[YAW] = 360;
604  G_SetMovedir (self->s.angles, self->movedir);
605  self->movedir[2] = st.height;
606  }
607 
608  gi.linkentity (self);
609 }

◆ target_actor_touch()

void target_actor_touch ( edict_t self,
edict_t other,
cplane_t plane,
csurface_t surf 
)

Definition at line 496 of file m_actor.c.

497 {
498  vec3_t v;
499 
500  if (other->movetarget != self)
501  return;
502 
503  if (other->enemy)
504  return;
505 
506  other->goalentity = other->movetarget = NULL;
507 
508  if (self->message)
509  {
510  int n;
511  edict_t *ent;
512 
513  for (n = 1; n <= game.maxclients; n++)
514  {
515  ent = &g_edicts[n];
516  if (!ent->inuse)
517  continue;
518  gi.cprintf (ent, PRINT_CHAT, "%s: %s\n", actor_names[(other - g_edicts)%MAX_ACTOR_NAMES], self->message);
519  }
520  }
521 
522  if (self->spawnflags & 1) //jump
523  {
524  other->velocity[0] = self->movedir[0] * self->speed;
525  other->velocity[1] = self->movedir[1] * self->speed;
526 
527  if (other->groundentity)
528  {
529  other->groundentity = NULL;
530  other->velocity[2] = self->movedir[2];
531  gi.sound(other, CHAN_VOICE, gi.soundindex("player/male/jump1.wav"), 1, ATTN_NORM, 0);
532  }
533  }
534 
535  if (self->spawnflags & 2) //shoot
536  {
537  }
538  else if (self->spawnflags & 4) //attack
539  {
540  other->enemy = G_PickTarget(self->pathtarget);
541  if (other->enemy)
542  {
543  other->goalentity = other->enemy;
544  if (self->spawnflags & 32)
545  other->monsterinfo.aiflags |= AI_BRUTAL;
546  if (self->spawnflags & 16)
547  {
549  actor_stand (other);
550  }
551  else
552  {
553  actor_run (other);
554  }
555  }
556  }
557 
558  if (!(self->spawnflags & 6) && (self->pathtarget))
559  {
560  char *savetarget;
561 
562  savetarget = self->target;
563  self->target = self->pathtarget;
564  G_UseTargets (self, other);
565  self->target = savetarget;
566  }
567 
568  other->movetarget = G_PickTarget(self->target);
569 
570  if (!other->goalentity)
571  other->goalentity = other->movetarget;
572 
573  if (!other->movetarget && !other->enemy)
574  {
575  other->monsterinfo.pausetime = level.time + 100000000;
576  other->monsterinfo.stand (other);
577  }
578  else if (other->movetarget == other->goalentity)
579  {
580  VectorSubtract (other->movetarget->s.origin, other->s.origin, v);
581  other->ideal_yaw = vectoyaw (v);
582  }
583 }

Referenced by SP_target_actor().

Variable Documentation

◆ actor_frames_attack

mframe_t actor_frames_attack[]
Initial value:
=
{
{ai_charge, -2, NULL},
{ai_charge, 3, NULL},
}

Definition at line 382 of file m_actor.c.

◆ actor_frames_death1

mframe_t actor_frames_death1[]
Initial value:
=
{
{ai_move, 0, NULL},
{ai_move, 0, NULL},
{ai_move, -13, NULL},
{ai_move, 14, NULL},
{ai_move, 3, NULL},
{ai_move, -2, NULL},
{ai_move, 1, NULL}
}

Definition at line 309 of file m_actor.c.

◆ actor_frames_death2

mframe_t actor_frames_death2[]
Initial value:
=
{
{ai_move, 0, NULL},
{ai_move, 7, NULL},
{ai_move, -6, NULL},
{ai_move, -5, NULL},
{ai_move, 1, NULL},
{ai_move, 0, NULL},
{ai_move, -1, NULL},
{ai_move, -2, NULL},
{ai_move, -1, NULL},
{ai_move, -9, NULL},
{ai_move, -13, NULL},
{ai_move, -13, NULL},
{ai_move, 0, NULL}
}

Definition at line 321 of file m_actor.c.

◆ actor_frames_flipoff

mframe_t actor_frames_flipoff[]
Initial value:
=
{
{ai_turn, 0, NULL},
{ai_turn, 0, NULL},
{ai_turn, 0, NULL},
{ai_turn, 0, NULL},
{ai_turn, 0, NULL},
{ai_turn, 0, NULL},
{ai_turn, 0, NULL},
{ai_turn, 0, NULL},
{ai_turn, 0, NULL},
{ai_turn, 0, NULL},
{ai_turn, 0, NULL},
{ai_turn, 0, NULL},
{ai_turn, 0, NULL},
{ai_turn, 0, NULL}
}

Definition at line 181 of file m_actor.c.

◆ actor_frames_pain1

mframe_t actor_frames_pain1[]
Initial value:
=
{
{ai_move, -5, NULL},
{ai_move, 4, NULL},
{ai_move, 1, NULL}
}

Definition at line 157 of file m_actor.c.

◆ actor_frames_pain2

mframe_t actor_frames_pain2[]
Initial value:
=
{
{ai_move, -4, NULL},
{ai_move, 4, NULL},
{ai_move, 0, NULL}
}

Definition at line 165 of file m_actor.c.

◆ actor_frames_pain3

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

Definition at line 173 of file m_actor.c.

◆ actor_frames_run

mframe_t actor_frames_run[]
Initial value:
=
{
{ai_run, 4, NULL},
{ai_run, 15, NULL},
{ai_run, 15, NULL},
{ai_run, 8, NULL},
{ai_run, 20, NULL},
{ai_run, 15, NULL},
{ai_run, 8, NULL},
{ai_run, 17, NULL},
{ai_run, 12, NULL},
{ai_run, -2, NULL},
{ai_run, -2, NULL},
{ai_run, -1, NULL}
}

Definition at line 119 of file m_actor.c.

◆ actor_frames_stand

mframe_t actor_frames_stand[]

Definition at line 39 of file m_actor.c.

◆ actor_frames_taunt

mframe_t actor_frames_taunt[]
Initial value:
=
{
{ai_turn, 0, NULL},
{ai_turn, 0, NULL},
{ai_turn, 0, NULL},
{ai_turn, 0, NULL},
{ai_turn, 0, NULL},
{ai_turn, 0, NULL},
{ai_turn, 0, NULL},
{ai_turn, 0, NULL},
{ai_turn, 0, NULL},
{ai_turn, 0, NULL},
{ai_turn, 0, NULL},
{ai_turn, 0, NULL},
{ai_turn, 0, NULL},
{ai_turn, 0, NULL},
{ai_turn, 0, NULL},
{ai_turn, 0, NULL},
{ai_turn, 0, NULL}
}

Definition at line 200 of file m_actor.c.

◆ actor_frames_walk

mframe_t actor_frames_walk[]
Initial value:
=
{
{ai_walk, 0, NULL},
{ai_walk, 6, NULL},
{ai_walk, 10, NULL},
{ai_walk, 3, NULL},
{ai_walk, 2, NULL},
{ai_walk, 7, NULL},
{ai_walk, 10, NULL},
{ai_walk, 1, NULL},
{ai_walk, 4, NULL},
{ai_walk, 0, NULL},
{ai_walk, 0, NULL}
}

Definition at line 97 of file m_actor.c.

◆ actor_move_attack

Definition at line 389 of file m_actor.c.

Referenced by actor_attack().

◆ actor_move_death1

Definition at line 319 of file m_actor.c.

Referenced by actor_die().

◆ actor_move_death2

Definition at line 337 of file m_actor.c.

Referenced by actor_die().

◆ actor_move_flipoff

Definition at line 198 of file m_actor.c.

Referenced by actor_pain().

◆ actor_move_pain1

Definition at line 163 of file m_actor.c.

Referenced by actor_pain().

◆ actor_move_pain2

Definition at line 171 of file m_actor.c.

Referenced by actor_pain().

◆ actor_move_pain3

Definition at line 179 of file m_actor.c.

Referenced by actor_pain().

◆ actor_move_run

Definition at line 134 of file m_actor.c.

Referenced by actor_run().

◆ actor_move_stand

Definition at line 85 of file m_actor.c.

Referenced by actor_stand(), and SP_misc_actor().

◆ actor_move_taunt

Definition at line 220 of file m_actor.c.

Referenced by actor_pain().

◆ actor_move_walk

Definition at line 111 of file m_actor.c.

Referenced by actor_walk().

◆ actor_names

char* actor_names[MAX_ACTOR_NAMES]
Initial value:
=
{
"Hellrot",
"Tokay",
"Killme",
"Disruptor",
"Adrianator",
"Rambear",
"Titus",
"Bitterman"
}

Definition at line 26 of file m_actor.c.

Referenced by actor_pain(), and target_actor_touch().

◆ messages

char* messages[]
Initial value:
=
{
"Watch it",
"#$@*&",
"Idiot",
"Check your targets"
}

Definition at line 222 of file m_actor.c.

Referenced by actor_pain().

gi
game_import_t gi
Definition: g_main.c:25
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
edict_s::ideal_yaw
float ideal_yaw
Definition: g_local.h:1034
game_import_t::dprintf
void(* dprintf)(char *fmt,...)
Definition: game.h:106
edict_s::s
entity_state_t s
Definition: g_local.h:964
edict_s::groundentity
edict_t * groundentity
Definition: g_local.h:1073
deathmatch
cvar_t * deathmatch
Definition: g_main.c:35
YAW
#define YAW
Definition: q_shared.h:66
DEAD_DEAD
#define DEAD_DEAD
Definition: g_local.h:113
AI_BRUTAL
#define AI_BRUTAL
Definition: g_local.h:136
DEFAULT_BULLET_HSPREAD
#define DEFAULT_BULLET_HSPREAD
Definition: g_local.h:664
ThrowGib
void ThrowGib(edict_t *self, char *gibname, int damage, int type)
Definition: g_misc.c:135
VectorSubtract
#define VectorSubtract(a, b, c)
Definition: q_shared.h:156
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
actor_pain
void actor_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: m_actor.c:230
SOLID_BBOX
@ SOLID_BBOX
Definition: game.h:37
MZ2_ACTOR_MACHINEGUN_1
#define MZ2_ACTOR_MACHINEGUN_1
Definition: q_shared.h:765
FRAMETIME
#define FRAMETIME
Definition: g_local.h:73
messages
char * messages[]
Definition: m_actor.c:222
edict_s::movetarget
edict_t * movetarget
Definition: g_local.h:1032
v
GLdouble v
Definition: qgl_win.c:143
st
spawn_temp_t st
Definition: g_main.c:27
actor_run
void actor_run(edict_t *self)
Definition: m_actor.c:136
actor_move_pain3
mmove_t actor_move_pain3
Definition: m_actor.c:179
actor_walk
void actor_walk(edict_t *self)
Definition: m_actor.c:113
actor_move_flipoff
mmove_t actor_move_flipoff
Definition: m_actor.c:198
entity_state_s::origin
vec3_t origin
Definition: q_shared.h:1173
SVF_NOCLIENT
#define SVF_NOCLIENT
Definition: game.h:27
mmove_t::frame
mframe_t * frame
Definition: g_local.h:412
actor_move_death2
mmove_t actor_move_death2
Definition: m_actor.c:337
AI_STAND_GROUND
#define AI_STAND_GROUND
Definition: g_local.h:127
edict_s::inuse
qboolean inuse
Definition: g_local.h:970
edict_s::targetname
char * targetname
Definition: g_local.h:1012
monsterinfo_t::stand
void(* stand)(edict_t *self)
Definition: g_local.h:423
actor_move_attack
mmove_t actor_move_attack
Definition: m_actor.c:389
MODEL_SCALE
#define MODEL_SCALE
Definition: m_actor.h:506
edict_s::max_health
int max_health
Definition: g_local.h:1052
SOLID_TRIGGER
@ SOLID_TRIGGER
Definition: game.h:36
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
edict_s::movedir
vec3_t movedir
Definition: g_local.h:1021
actor_move_run
mmove_t actor_move_run
Definition: m_actor.c:134
actor_attack
void actor_attack(edict_t *self)
Definition: m_actor.c:391
vectoyaw
float vectoyaw(vec3_t vec)
Definition: g_utils.c:333
actor_fire
void actor_fire(edict_t *self)
Definition: m_actor.c:372
edict_s::mins
vec3_t mins
Definition: g_local.h:984
g_edicts
edict_t * g_edicts
Definition: g_main.c:33
ATTN_NORM
#define ATTN_NORM
Definition: q_shared.h:1019
actor_move_pain2
mmove_t actor_move_pain2
Definition: m_actor.c:171
ai_turn
void ai_turn(edict_t *self, float dist)
Definition: g_ai.c:215
walkmonster_start
void walkmonster_start(edict_t *self)
Definition: g_monster.c:692
MOVETYPE_STEP
@ MOVETYPE_STEP
Definition: g_local.h:194
actor_names
char * actor_names[MAX_ACTOR_NAMES]
Definition: m_actor.c:26
PRINT_CHAT
#define PRINT_CHAT
Definition: q_shared.h:93
SVF_DEADMONSTER
#define SVF_DEADMONSTER
Definition: game.h:28
edict_s::message
char * message
Definition: g_local.h:1004
AngleVectors
void AngleVectors(vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
Definition: q_shared.c:93
CHAN_VOICE
#define CHAN_VOICE
Definition: q_shared.h:1009
monster_flash_offset
vec3_t monster_flash_offset[]
Definition: m_flash.c:27
DEFAULT_BULLET_VSPREAD
#define DEFAULT_BULLET_VSPREAD
Definition: g_local.h:665
edict_s::classname
char * classname
Definition: g_local.h:1005
edict_s::speed
float speed
Definition: g_local.h:1020
edict_s
Definition: g_local.h:962
spawn_temp_t::height
int height
Definition: g_local.h:357
G_FreeEdict
void G_FreeEdict(edict_t *e)
Definition: g_utils.c:452
monsterinfo_t::pausetime
float pausetime
Definition: g_local.h:434
actor_move_stand
mmove_t actor_move_stand
Definition: m_actor.c:85
game_import_t::soundindex
int(* soundindex)(char *name)
Definition: game.h:122
forward
static vec3_t forward
Definition: p_view.c:29
edict_s::spawnflags
int spawnflags
Definition: g_local.h:1006
actor_move_walk
mmove_t actor_move_walk
Definition: m_actor.c:111
AI_HOLD_FRAME
#define AI_HOLD_FRAME
Definition: g_local.h:134
actor_move_pain1
mmove_t actor_move_pain1
Definition: m_actor.c:163
game_import_t::modelindex
int(* modelindex)(char *name)
Definition: game.h:121
actorMachineGun
void actorMachineGun(edict_t *self)
Definition: m_actor.c:269
edict_s::deadflag
int deadflag
Definition: g_local.h:1054
actor_die
void actor_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: m_actor.c:339
cvar_s::value
float value
Definition: q_shared.h:324
vtos
char * vtos(vec3_t v)
Definition: g_utils.c:293
game
game_locals_t game
Definition: g_main.c:23
ai_walk
void ai_walk(edict_t *self, float dist)
Definition: g_ai.c:163
random
#define random()
Definition: g_local.h:509
VectorNormalize
vec_t VectorNormalize(vec3_t v)
Definition: q_shared.c:681
NULL
#define NULL
Definition: q_shared.h:60
actor_use
void actor_use(edict_t *self, edict_t *other, edict_t *activator)
Definition: m_actor.c:401
actor_move_death1
mmove_t actor_move_death1
Definition: m_actor.c:319
monsterinfo_t::aiflags
int aiflags
Definition: g_local.h:419
edict_s::goalentity
edict_t * goalentity
Definition: g_local.h:1031
monster_fire_bullet
void monster_fire_bullet(edict_t *self, vec3_t start, vec3_t dir, int damage, int kick, int hspread, int vspread, int flashtype)
Definition: g_monster.c:31
edict_s::pathtarget
char * pathtarget
Definition: g_local.h:1015
name
cvar_t * name
Definition: cl_main.c:94
edict_s::velocity
vec3_t velocity
Definition: g_local.h:1024
ai_move
void ai_move(edict_t *self, float dist)
Definition: g_ai.c:92
VectorCopy
#define VectorCopy(a, b)
Definition: q_shared.h:158
edict_s::pain_debounce_time
float pain_debounce_time
Definition: g_local.h:1046
game_import_t::cprintf
void(* cprintf)(edict_t *ent, int printlevel, char *fmt,...)
Definition: game.h:107
edict_s::monsterinfo
monsterinfo_t monsterinfo
Definition: g_local.h:1108
level
GLint level
Definition: qgl_win.c:116
MAX_ACTOR_NAMES
#define MAX_ACTOR_NAMES
Definition: m_actor.c:25
ai_run
void ai_run(edict_t *self, float dist)
Definition: g_ai.c:915
G_UseTargets
void G_UseTargets(edict_t *ent, edict_t *activator)
Definition: g_utils.c:173
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
edict_s::maxs
vec3_t maxs
Definition: g_local.h:984
G_SetMovedir
void G_SetMovedir(vec3_t angles, vec3_t movedir)
Definition: g_utils.c:314
ThrowHead
void ThrowHead(edict_t *self, char *gibname, int damage, int type)
Definition: g_misc.c:183
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
actor_move_taunt
mmove_t actor_move_taunt
Definition: m_actor.c:220
G_PickTarget
edict_t * G_PickTarget(char *targetname)
Definition: g_utils.c:118
edict_s::enemy
edict_t * enemy
Definition: g_local.h:1070
game_import_t::linkentity
void(* linkentity)(edict_t *ent)
Definition: game.h:138
actor_stand
void actor_stand(edict_t *self)
Definition: m_actor.c:87
entity_state_s::angles
vec3_t angles
Definition: q_shared.h:1174
vec3_t
vec_t vec3_t[3]
Definition: q_shared.h:127
edict_s::absmin
vec3_t absmin
Definition: g_local.h:985
target_actor_touch
void target_actor_touch(edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
Definition: m_actor.c:496
edict_s::target
char * target
Definition: g_local.h:1011
edict_s::health
int health
Definition: g_local.h:1051
game_locals_t::maxclients
int maxclients
Definition: g_local.h:284