vkQuake2 doxygen  1.0 dev
m_brain.c File Reference
#include "g_local.h"
#include "m_brain.h"

Go to the source code of this file.

Functions

void brain_sight (edict_t *self, edict_t *other)
 
void brain_search (edict_t *self)
 
void brain_run (edict_t *self)
 
void brain_dead (edict_t *self)
 
void brain_stand (edict_t *self)
 
void brain_idle (edict_t *self)
 
void brain_walk (edict_t *self)
 
void brain_duck_down (edict_t *self)
 
void brain_duck_hold (edict_t *self)
 
void brain_duck_up (edict_t *self)
 
void brain_dodge (edict_t *self, edict_t *attacker, float eta)
 
void brain_swing_right (edict_t *self)
 
void brain_hit_right (edict_t *self)
 
void brain_swing_left (edict_t *self)
 
void brain_hit_left (edict_t *self)
 
void brain_chest_open (edict_t *self)
 
void brain_tentacle_attack (edict_t *self)
 
void brain_chest_closed (edict_t *self)
 
void brain_melee (edict_t *self)
 
void brain_pain (edict_t *self, edict_t *other, float kick, int damage)
 
void brain_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
 
void SP_monster_brain (edict_t *self)
 

Variables

static int sound_chest_open
 
static int sound_tentacles_extend
 
static int sound_tentacles_retract
 
static int sound_death
 
static int sound_idle1
 
static int sound_idle2
 
static int sound_idle3
 
static int sound_pain1
 
static int sound_pain2
 
static int sound_sight
 
static int sound_search
 
static int sound_melee1
 
static int sound_melee2
 
static int sound_melee3
 
mframe_t brain_frames_stand []
 
mmove_t brain_move_stand = {FRAME_stand01, FRAME_stand30, brain_frames_stand, NULL}
 
mframe_t brain_frames_idle []
 
mmove_t brain_move_idle = {FRAME_stand31, FRAME_stand60, brain_frames_idle, brain_stand}
 
mframe_t brain_frames_walk1 []
 
mmove_t brain_move_walk1 = {FRAME_walk101, FRAME_walk111, brain_frames_walk1, NULL}
 
mframe_t brain_frames_defense []
 
mmove_t brain_move_defense = {FRAME_defens01, FRAME_defens08, brain_frames_defense, NULL}
 
mframe_t brain_frames_pain3 []
 
mmove_t brain_move_pain3 = {FRAME_pain301, FRAME_pain306, brain_frames_pain3, brain_run}
 
mframe_t brain_frames_pain2 []
 
mmove_t brain_move_pain2 = {FRAME_pain201, FRAME_pain208, brain_frames_pain2, brain_run}
 
mframe_t brain_frames_pain1 []
 
mmove_t brain_move_pain1 = {FRAME_pain101, FRAME_pain121, brain_frames_pain1, brain_run}
 
mframe_t brain_frames_duck []
 
mmove_t brain_move_duck = {FRAME_duck01, FRAME_duck08, brain_frames_duck, brain_run}
 
mframe_t brain_frames_death2 []
 
mmove_t brain_move_death2 = {FRAME_death201, FRAME_death205, brain_frames_death2, brain_dead}
 
mframe_t brain_frames_death1 []
 
mmove_t brain_move_death1 = {FRAME_death101, FRAME_death118, brain_frames_death1, brain_dead}
 
mframe_t brain_frames_attack1 []
 
mmove_t brain_move_attack1 = {FRAME_attak101, FRAME_attak118, brain_frames_attack1, brain_run}
 
mframe_t brain_frames_attack2 []
 
mmove_t brain_move_attack2 = {FRAME_attak201, FRAME_attak217, brain_frames_attack2, brain_run}
 
mframe_t brain_frames_run []
 
mmove_t brain_move_run = {FRAME_walk101, FRAME_walk111, brain_frames_run, NULL}
 

Function Documentation

◆ brain_chest_closed()

void brain_chest_closed ( edict_t self)

Definition at line 471 of file m_brain.c.

472 {
473  self->monsterinfo.power_armor_type = POWER_ARMOR_SCREEN;
474  if (self->spawnflags & 65536)
475  {
476  self->spawnflags &= ~65536;
477  self->monsterinfo.currentmove = &brain_move_attack1;
478  }
479 }

◆ brain_chest_open()

void brain_chest_open ( edict_t self)

Definition at line 454 of file m_brain.c.

455 {
456  self->spawnflags &= ~65536;
457  self->monsterinfo.power_armor_type = POWER_ARMOR_NONE;
458  gi.sound (self, CHAN_BODY, sound_chest_open, 1, ATTN_NORM, 0);
459 }

◆ brain_dead()

void brain_dead ( edict_t self)

Definition at line 574 of file m_brain.c.

575 {
576  VectorSet (self->mins, -16, -16, -24);
577  VectorSet (self->maxs, 16, 16, -8);
578  self->movetype = MOVETYPE_TOSS;
579  self->svflags |= SVF_DEADMONSTER;
580  self->nextthink = 0;
581  gi.linkentity (self);
582 }

◆ brain_die()

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

Definition at line 586 of file m_brain.c.

587 {
588  int n;
589 
590  self->s.effects = 0;
591  self->monsterinfo.power_armor_type = POWER_ARMOR_NONE;
592 
593 // check for gib
594  if (self->health <= self->gib_health)
595  {
596  gi.sound (self, CHAN_VOICE, gi.soundindex ("misc/udeath.wav"), 1, ATTN_NORM, 0);
597  for (n= 0; n < 2; n++)
598  ThrowGib (self, "models/objects/gibs/bone/tris.md2", damage, GIB_ORGANIC);
599  for (n= 0; n < 4; n++)
600  ThrowGib (self, "models/objects/gibs/sm_meat/tris.md2", damage, GIB_ORGANIC);
601  ThrowHead (self, "models/objects/gibs/head2/tris.md2", damage, GIB_ORGANIC);
602  self->deadflag = DEAD_DEAD;
603  return;
604  }
605 
606  if (self->deadflag == DEAD_DEAD)
607  return;
608 
609 // regular death
610  gi.sound (self, CHAN_VOICE, sound_death, 1, ATTN_NORM, 0);
611  self->deadflag = DEAD_DEAD;
612  self->takedamage = DAMAGE_YES;
613  if (random() <= 0.5)
614  self->monsterinfo.currentmove = &brain_move_death1;
615  else
616  self->monsterinfo.currentmove = &brain_move_death2;
617 }

Referenced by SP_monster_brain().

◆ brain_dodge()

void brain_dodge ( edict_t self,
edict_t attacker,
float  eta 
)

Definition at line 352 of file m_brain.c.

353 {
354  if (random() > 0.25)
355  return;
356 
357  if (!self->enemy)
358  self->enemy = attacker;
359 
360  self->monsterinfo.pausetime = level.time + eta + 0.5;
361  self->monsterinfo.currentmove = &brain_move_duck;
362 }

Referenced by SP_monster_brain().

◆ brain_duck_down()

void brain_duck_down ( edict_t self)

Definition at line 313 of file m_brain.c.

314 {
315  if (self->monsterinfo.aiflags & AI_DUCKED)
316  return;
317  self->monsterinfo.aiflags |= AI_DUCKED;
318  self->maxs[2] -= 32;
319  self->takedamage = DAMAGE_YES;
320  gi.linkentity (self);
321 }

◆ brain_duck_hold()

void brain_duck_hold ( edict_t self)

Definition at line 323 of file m_brain.c.

324 {
325  if (level.time >= self->monsterinfo.pausetime)
326  self->monsterinfo.aiflags &= ~AI_HOLD_FRAME;
327  else
328  self->monsterinfo.aiflags |= AI_HOLD_FRAME;
329 }

◆ brain_duck_up()

void brain_duck_up ( edict_t self)

Definition at line 331 of file m_brain.c.

332 {
333  self->monsterinfo.aiflags &= ~AI_DUCKED;
334  self->maxs[2] += 32;
335  self->takedamage = DAMAGE_AIM;
336  gi.linkentity (self);
337 }

◆ brain_hit_left()

void brain_hit_left ( edict_t self)

Definition at line 422 of file m_brain.c.

423 {
424  vec3_t aim;
425 
426  VectorSet (aim, MELEE_DISTANCE, self->mins[0], 8);
427  if (fire_hit (self, aim, (15 + (rand() %5)), 40))
428  gi.sound (self, CHAN_WEAPON, sound_melee3, 1, ATTN_NORM, 0);
429 }

◆ brain_hit_right()

void brain_hit_right ( edict_t self)

Definition at line 408 of file m_brain.c.

409 {
410  vec3_t aim;
411 
412  VectorSet (aim, MELEE_DISTANCE, self->maxs[0], 8);
413  if (fire_hit (self, aim, (15 + (rand() %5)), 40))
414  gi.sound (self, CHAN_WEAPON, sound_melee3, 1, ATTN_NORM, 0);
415 }

◆ brain_idle()

void brain_idle ( edict_t self)

Definition at line 151 of file m_brain.c.

152 {
153  gi.sound (self, CHAN_AUTO, sound_idle3, 1, ATTN_IDLE, 0);
154  self->monsterinfo.currentmove = &brain_move_idle;
155 }

Referenced by SP_monster_brain().

◆ brain_melee()

void brain_melee ( edict_t self)

Definition at line 503 of file m_brain.c.

504 {
505  if (random() <= 0.5)
506  self->monsterinfo.currentmove = &brain_move_attack1;
507  else
508  self->monsterinfo.currentmove = &brain_move_attack2;
509 }

Referenced by SP_monster_brain().

◆ brain_pain()

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

Definition at line 542 of file m_brain.c.

543 {
544  float r;
545 
546  if (self->health < (self->max_health / 2))
547  self->s.skinnum = 1;
548 
549  if (level.time < self->pain_debounce_time)
550  return;
551 
552  self->pain_debounce_time = level.time + 3;
553  if (skill->value == 3)
554  return; // no pain anims in nightmare
555 
556  r = random();
557  if (r < 0.33)
558  {
559  gi.sound (self, CHAN_VOICE, sound_pain1, 1, ATTN_NORM, 0);
560  self->monsterinfo.currentmove = &brain_move_pain1;
561  }
562  else if (r < 0.66)
563  {
564  gi.sound (self, CHAN_VOICE, sound_pain2, 1, ATTN_NORM, 0);
565  self->monsterinfo.currentmove = &brain_move_pain2;
566  }
567  else
568  {
569  gi.sound (self, CHAN_VOICE, sound_pain1, 1, ATTN_NORM, 0);
570  self->monsterinfo.currentmove = &brain_move_pain3;
571  }
572 }

Referenced by SP_monster_brain().

◆ brain_run()

void brain_run ( edict_t self)

Definition at line 532 of file m_brain.c.

533 {
534  self->monsterinfo.power_armor_type = POWER_ARMOR_SCREEN;
535  if (self->monsterinfo.aiflags & AI_STAND_GROUND)
536  self->monsterinfo.currentmove = &brain_move_stand;
537  else
538  self->monsterinfo.currentmove = &brain_move_run;
539 }

Referenced by SP_monster_brain().

◆ brain_search()

void brain_search ( edict_t self)

Definition at line 53 of file m_brain.c.

54 {
55  gi.sound (self, CHAN_VOICE, sound_search, 1, ATTN_NORM, 0);
56 }

Referenced by SP_monster_brain().

◆ brain_sight()

void brain_sight ( edict_t self,
edict_t other 
)

Definition at line 48 of file m_brain.c.

49 {
50  gi.sound (self, CHAN_VOICE, sound_sight, 1, ATTN_NORM, 0);
51 }

Referenced by SP_monster_brain().

◆ brain_stand()

void brain_stand ( edict_t self)

Definition at line 104 of file m_brain.c.

105 {
106  self->monsterinfo.currentmove = &brain_move_stand;
107 }

Referenced by SP_monster_brain().

◆ brain_swing_left()

void brain_swing_left ( edict_t self)

Definition at line 417 of file m_brain.c.

418 {
419  gi.sound (self, CHAN_BODY, sound_melee2, 1, ATTN_NORM, 0);
420 }

◆ brain_swing_right()

void brain_swing_right ( edict_t self)

Definition at line 403 of file m_brain.c.

404 {
405  gi.sound (self, CHAN_BODY, sound_melee1, 1, ATTN_NORM, 0);
406 }

◆ brain_tentacle_attack()

void brain_tentacle_attack ( edict_t self)

Definition at line 461 of file m_brain.c.

462 {
463  vec3_t aim;
464 
465  VectorSet (aim, MELEE_DISTANCE, 0, 8);
466  if (fire_hit (self, aim, (10 + (rand() %5)), -600) && skill->value > 0)
467  self->spawnflags |= 65536;
469 }

◆ brain_walk()

void brain_walk ( edict_t self)

Definition at line 234 of file m_brain.c.

235 {
236 // if (random() <= 0.5)
237  self->monsterinfo.currentmove = &brain_move_walk1;
238 // else
239 // self->monsterinfo.currentmove = &brain_move_walk2;
240 }

Referenced by SP_monster_brain().

◆ SP_monster_brain()

void SP_monster_brain ( edict_t self)

Definition at line 621 of file m_brain.c.

622 {
623  if (deathmatch->value)
624  {
625  G_FreeEdict (self);
626  return;
627  }
628 
629  sound_chest_open = gi.soundindex ("brain/brnatck1.wav");
630  sound_tentacles_extend = gi.soundindex ("brain/brnatck2.wav");
631  sound_tentacles_retract = gi.soundindex ("brain/brnatck3.wav");
632  sound_death = gi.soundindex ("brain/brndeth1.wav");
633  sound_idle1 = gi.soundindex ("brain/brnidle1.wav");
634  sound_idle2 = gi.soundindex ("brain/brnidle2.wav");
635  sound_idle3 = gi.soundindex ("brain/brnlens1.wav");
636  sound_pain1 = gi.soundindex ("brain/brnpain1.wav");
637  sound_pain2 = gi.soundindex ("brain/brnpain2.wav");
638  sound_sight = gi.soundindex ("brain/brnsght1.wav");
639  sound_search = gi.soundindex ("brain/brnsrch1.wav");
640  sound_melee1 = gi.soundindex ("brain/melee1.wav");
641  sound_melee2 = gi.soundindex ("brain/melee2.wav");
642  sound_melee3 = gi.soundindex ("brain/melee3.wav");
643 
644  self->movetype = MOVETYPE_STEP;
645  self->solid = SOLID_BBOX;
646  self->s.modelindex = gi.modelindex ("models/monsters/brain/tris.md2");
647  VectorSet (self->mins, -16, -16, -24);
648  VectorSet (self->maxs, 16, 16, 32);
649 
650  self->health = 300;
651  self->gib_health = -150;
652  self->mass = 400;
653 
654  self->pain = brain_pain;
655  self->die = brain_die;
656 
657  self->monsterinfo.stand = brain_stand;
658  self->monsterinfo.walk = brain_walk;
659  self->monsterinfo.run = brain_run;
660  self->monsterinfo.dodge = brain_dodge;
661 // self->monsterinfo.attack = brain_attack;
662  self->monsterinfo.melee = brain_melee;
663  self->monsterinfo.sight = brain_sight;
664  self->monsterinfo.search = brain_search;
665  self->monsterinfo.idle = brain_idle;
666 
667  self->monsterinfo.power_armor_type = POWER_ARMOR_SCREEN;
668  self->monsterinfo.power_armor_power = 100;
669 
670  gi.linkentity (self);
671 
672  self->monsterinfo.currentmove = &brain_move_stand;
673  self->monsterinfo.scale = MODEL_SCALE;
674 
675  walkmonster_start (self);
676 }

Variable Documentation

◆ brain_frames_attack1

mframe_t brain_frames_attack1[]

◆ brain_frames_attack2

mframe_t brain_frames_attack2[]

◆ brain_frames_death1

mframe_t brain_frames_death1[]
Initial value:
=
{
ai_move, -2, NULL,
}

Definition at line 375 of file m_brain.c.

◆ brain_frames_death2

mframe_t brain_frames_death2[]
Initial value:
=
{
}

Definition at line 365 of file m_brain.c.

◆ brain_frames_defense

mframe_t brain_frames_defense[]
Initial value:
=
{
}

Definition at line 244 of file m_brain.c.

◆ brain_frames_duck

mframe_t brain_frames_duck[]
Initial value:

Definition at line 339 of file m_brain.c.

◆ brain_frames_idle

mframe_t brain_frames_idle[]

Definition at line 114 of file m_brain.c.

◆ brain_frames_pain1

mframe_t brain_frames_pain1[]
Initial value:
=
{
ai_move, -6, NULL,
ai_move, -2, NULL,
ai_move, -6, NULL,
}

Definition at line 282 of file m_brain.c.

◆ brain_frames_pain2

mframe_t brain_frames_pain2[]
Initial value:
=
{
ai_move, -2, NULL,
}

Definition at line 269 of file m_brain.c.

◆ brain_frames_pain3

mframe_t brain_frames_pain3[]
Initial value:
=
{
ai_move, -2, NULL,
}

Definition at line 258 of file m_brain.c.

◆ brain_frames_run

mframe_t brain_frames_run[]
Initial value:
=
{
ai_run, 9, NULL,
ai_run, 2, NULL,
ai_run, 3, NULL,
ai_run, 3, NULL,
ai_run, 1, NULL,
ai_run, 0, NULL,
ai_run, 0, NULL,
ai_run, 10, NULL,
ai_run, -4, NULL,
ai_run, -1, NULL,
}

Definition at line 516 of file m_brain.c.

◆ brain_frames_stand

mframe_t brain_frames_stand[]

Definition at line 67 of file m_brain.c.

◆ brain_frames_walk1

mframe_t brain_frames_walk1[]
Initial value:
=
{
ai_walk, -4, NULL,
ai_walk, -1, NULL,
}

Definition at line 161 of file m_brain.c.

◆ brain_move_attack1

Definition at line 452 of file m_brain.c.

Referenced by brain_chest_closed(), and brain_melee().

◆ brain_move_attack2

Definition at line 501 of file m_brain.c.

Referenced by brain_melee().

◆ brain_move_death1

Definition at line 396 of file m_brain.c.

Referenced by brain_die().

◆ brain_move_death2

Definition at line 373 of file m_brain.c.

Referenced by brain_die().

◆ brain_move_defense

Definition at line 256 of file m_brain.c.

◆ brain_move_duck

Definition at line 350 of file m_brain.c.

Referenced by brain_dodge().

◆ brain_move_idle

Definition at line 149 of file m_brain.c.

Referenced by brain_idle().

◆ brain_move_pain1

Definition at line 306 of file m_brain.c.

Referenced by brain_pain().

◆ brain_move_pain2

Definition at line 280 of file m_brain.c.

Referenced by brain_pain().

◆ brain_move_pain3

Definition at line 267 of file m_brain.c.

Referenced by brain_pain().

◆ brain_move_run

Definition at line 530 of file m_brain.c.

Referenced by brain_run().

◆ brain_move_stand

Definition at line 102 of file m_brain.c.

Referenced by brain_run(), brain_stand(), and SP_monster_brain().

◆ brain_move_walk1

Definition at line 175 of file m_brain.c.

Referenced by brain_walk().

◆ sound_chest_open

int sound_chest_open
static

Definition at line 32 of file m_brain.c.

Referenced by brain_chest_open(), and SP_monster_brain().

◆ sound_death

int sound_death
static

Definition at line 35 of file m_brain.c.

Referenced by brain_die(), and SP_monster_brain().

◆ sound_idle1

int sound_idle1
static

Definition at line 36 of file m_brain.c.

Referenced by SP_monster_brain().

◆ sound_idle2

int sound_idle2
static

Definition at line 37 of file m_brain.c.

Referenced by SP_monster_brain().

◆ sound_idle3

int sound_idle3
static

Definition at line 38 of file m_brain.c.

Referenced by brain_idle(), and SP_monster_brain().

◆ sound_melee1

int sound_melee1
static

Definition at line 43 of file m_brain.c.

Referenced by brain_swing_right(), and SP_monster_brain().

◆ sound_melee2

int sound_melee2
static

Definition at line 44 of file m_brain.c.

Referenced by brain_swing_left(), and SP_monster_brain().

◆ sound_melee3

int sound_melee3
static

Definition at line 45 of file m_brain.c.

Referenced by brain_hit_left(), brain_hit_right(), and SP_monster_brain().

◆ sound_pain1

int sound_pain1
static

Definition at line 39 of file m_brain.c.

Referenced by brain_pain(), and SP_monster_brain().

◆ sound_pain2

int sound_pain2
static

Definition at line 40 of file m_brain.c.

Referenced by brain_pain(), and SP_monster_brain().

◆ sound_search

int sound_search
static

Definition at line 42 of file m_brain.c.

Referenced by brain_search(), and SP_monster_brain().

◆ sound_sight

int sound_sight
static

Definition at line 41 of file m_brain.c.

Referenced by brain_sight(), and SP_monster_brain().

◆ sound_tentacles_extend

int sound_tentacles_extend
static

Definition at line 33 of file m_brain.c.

Referenced by SP_monster_brain().

◆ sound_tentacles_retract

int sound_tentacles_retract
static

Definition at line 34 of file m_brain.c.

Referenced by brain_tentacle_attack(), and SP_monster_brain().

gi
game_import_t gi
Definition: g_main.c:25
deathmatch
cvar_t * deathmatch
Definition: g_main.c:35
DEAD_DEAD
#define DEAD_DEAD
Definition: g_local.h:115
sound_melee2
static int sound_melee2
Definition: m_brain.c:44
sound_melee1
static int sound_melee1
Definition: m_brain.c:43
brain_move_attack2
mmove_t brain_move_attack2
Definition: m_brain.c:501
ThrowGib
void ThrowGib(edict_t *self, char *gibname, int damage, int type)
Definition: g_misc.c:135
edict_s::gib_health
int gib_health
Definition: g_local.h:1059
MELEE_DISTANCE
#define MELEE_DISTANCE
Definition: g_local.h:82
brain_move_attack1
mmove_t brain_move_attack1
Definition: m_brain.c:452
brain_tentacle_attack
void brain_tentacle_attack(edict_t *self)
Definition: m_brain.c:461
ai_charge
void ai_charge(edict_t *self, float dist)
Definition: g_ai.c:194
SOLID_BBOX
@ SOLID_BBOX
Definition: game.h:37
brain_duck_up
void brain_duck_up(edict_t *self)
Definition: m_brain.c:331
AI_STAND_GROUND
#define AI_STAND_GROUND
Definition: g_local.h:129
MODEL_SCALE
#define MODEL_SCALE
Definition: m_actor.h:506
edict_s::max_health
int max_health
Definition: g_local.h:1058
DAMAGE_YES
@ DAMAGE_YES
Definition: g_local.h:89
game_import_t::sound
void(* sound)(edict_t *ent, int channel, int soundindex, float volume, float attenuation, float timeofs)
Definition: game.h:109
brain_die
void brain_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: m_brain.c:586
ATTN_IDLE
#define ATTN_IDLE
Definition: q_shared.h:996
brain_chest_open
void brain_chest_open(edict_t *self)
Definition: m_brain.c:454
edict_s::mins
vec3_t mins
Definition: g_local.h:990
fire_hit
qboolean fire_hit(edict_t *self, vec3_t aim, int damage, int kick)
Definition: g_weapon.c:63
brain_move_run
mmove_t brain_move_run
Definition: m_brain.c:530
sound_chest_open
static int sound_chest_open
Definition: m_brain.c:32
ATTN_NORM
#define ATTN_NORM
Definition: q_shared.h:995
walkmonster_start
void walkmonster_start(edict_t *self)
Definition: g_monster.c:692
MOVETYPE_STEP
@ MOVETYPE_STEP
Definition: g_local.h:196
brain_swing_right
void brain_swing_right(edict_t *self)
Definition: m_brain.c:403
brain_swing_left
void brain_swing_left(edict_t *self)
Definition: m_brain.c:417
brain_sight
void brain_sight(edict_t *self, edict_t *other)
Definition: m_brain.c:48
brain_walk
void brain_walk(edict_t *self)
Definition: m_brain.c:234
SVF_DEADMONSTER
#define SVF_DEADMONSTER
Definition: game.h:28
CHAN_AUTO
#define CHAN_AUTO
Definition: q_shared.h:983
POWER_ARMOR_SCREEN
#define POWER_ARMOR_SCREEN
Definition: g_local.h:160
brain_stand
void brain_stand(edict_t *self)
Definition: m_brain.c:104
brain_hit_left
void brain_hit_left(edict_t *self)
Definition: m_brain.c:422
CHAN_VOICE
#define CHAN_VOICE
Definition: q_shared.h:985
sound_sight
static int sound_sight
Definition: m_brain.c:41
G_FreeEdict
void G_FreeEdict(edict_t *e)
Definition: g_utils.c:452
monsterinfo_t::pausetime
float pausetime
Definition: g_local.h:436
r
GLdouble GLdouble r
Definition: qgl_win.c:336
sound_search
static int sound_search
Definition: m_brain.c:42
game_import_t::soundindex
int(* soundindex)(char *name)
Definition: game.h:122
edict_s::spawnflags
int spawnflags
Definition: g_local.h:1012
brain_idle
void brain_idle(edict_t *self)
Definition: m_brain.c:151
AI_HOLD_FRAME
#define AI_HOLD_FRAME
Definition: g_local.h:136
game_import_t::modelindex
int(* modelindex)(char *name)
Definition: game.h:121
brain_move_death2
mmove_t brain_move_death2
Definition: m_brain.c:373
edict_s::deadflag
int deadflag
Definition: g_local.h:1060
cvar_s::value
float value
Definition: q_shared.h:331
ai_walk
void ai_walk(edict_t *self, float dist)
Definition: g_ai.c:163
random
#define random()
Definition: g_local.h:515
brain_duck_hold
void brain_duck_hold(edict_t *self)
Definition: m_brain.c:323
NULL
#define NULL
Definition: q_shared.h:67
sound_pain2
static int sound_pain2
Definition: m_brain.c:40
monsterinfo_t::aiflags
int aiflags
Definition: g_local.h:421
brain_move_duck
mmove_t brain_move_duck
Definition: m_brain.c:350
brain_pain
void brain_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: m_brain.c:542
skill
cvar_t * skill
Definition: g_main.c:38
sound_tentacles_retract
static int sound_tentacles_retract
Definition: m_brain.c:34
ai_move
void ai_move(edict_t *self, float dist)
Definition: g_ai.c:92
sound_melee3
static int sound_melee3
Definition: m_brain.c:45
edict_s::pain_debounce_time
float pain_debounce_time
Definition: g_local.h:1052
brain_melee
void brain_melee(edict_t *self)
Definition: m_brain.c:503
edict_s::monsterinfo
monsterinfo_t monsterinfo
Definition: g_local.h:1114
DAMAGE_AIM
@ DAMAGE_AIM
Definition: g_local.h:90
CHAN_WEAPON
#define CHAN_WEAPON
Definition: q_shared.h:984
level
GLint level
Definition: qgl_win.c:116
ai_run
void ai_run(edict_t *self, float dist)
Definition: g_ai.c:914
GIB_ORGANIC
#define GIB_ORGANIC
Definition: g_local.h:125
brain_hit_right
void brain_hit_right(edict_t *self)
Definition: m_brain.c:408
edict_s::maxs
vec3_t maxs
Definition: g_local.h:990
sound_tentacles_extend
static int sound_tentacles_extend
Definition: m_brain.c:33
ThrowHead
void ThrowHead(edict_t *self, char *gibname, int damage, int type)
Definition: g_misc.c:183
sound_idle3
static int sound_idle3
Definition: m_brain.c:38
brain_chest_closed
void brain_chest_closed(edict_t *self)
Definition: m_brain.c:471
sound_death
static int sound_death
Definition: m_brain.c:35
MOVETYPE_TOSS
@ MOVETYPE_TOSS
Definition: g_local.h:198
VectorSet
#define VectorSet(v, x, y, z)
Definition: q_shared.h:168
CHAN_BODY
#define CHAN_BODY
Definition: q_shared.h:987
brain_move_death1
mmove_t brain_move_death1
Definition: m_brain.c:396
brain_run
void brain_run(edict_t *self)
Definition: m_brain.c:532
sound_idle2
static int sound_idle2
Definition: m_brain.c:37
edict_s::enemy
edict_t * enemy
Definition: g_local.h:1076
AI_DUCKED
#define AI_DUCKED
Definition: g_local.h:140
game_import_t::linkentity
void(* linkentity)(edict_t *ent)
Definition: game.h:138
brain_move_pain1
mmove_t brain_move_pain1
Definition: m_brain.c:306
sound_idle1
static int sound_idle1
Definition: m_brain.c:36
brain_move_stand
mmove_t brain_move_stand
Definition: m_brain.c:102
brain_move_pain3
mmove_t brain_move_pain3
Definition: m_brain.c:267
brain_move_walk1
mmove_t brain_move_walk1
Definition: m_brain.c:175
vec3_t
vec_t vec3_t[3]
Definition: q_shared.h:134
brain_dodge
void brain_dodge(edict_t *self, edict_t *attacker, float eta)
Definition: m_brain.c:352
brain_search
void brain_search(edict_t *self)
Definition: m_brain.c:53
brain_duck_down
void brain_duck_down(edict_t *self)
Definition: m_brain.c:313
POWER_ARMOR_NONE
#define POWER_ARMOR_NONE
Definition: g_local.h:159
brain_move_pain2
mmove_t brain_move_pain2
Definition: m_brain.c:280
sound_pain1
static int sound_pain1
Definition: m_brain.c:39
edict_s::health
int health
Definition: g_local.h:1057
brain_move_idle
mmove_t brain_move_idle
Definition: m_brain.c:149