Quake II RTX doxygen  1.0 dev
m_brain.c
Go to the documentation of this file.
1 /*
2 Copyright (C) 1997-2001 Id Software, Inc.
3 
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8 
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13 
14 You should have received a copy of the GNU General Public License along
15 with this program; if not, write to the Free Software Foundation, Inc.,
16 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
18 /*
19 ==============================================================================
20 
21 brain
22 
23 ==============================================================================
24 */
25 
26 #include "g_local.h"
27 #include "m_brain.h"
28 
29 
30 static int sound_chest_open;
33 static int sound_death;
34 static int sound_idle1;
35 static int sound_idle2;
36 static int sound_idle3;
37 static int sound_pain1;
38 static int sound_pain2;
39 static int sound_sight;
40 static int sound_search;
41 static int sound_melee1;
42 static int sound_melee2;
43 static int sound_melee3;
44 
45 
46 void brain_sight(edict_t *self, edict_t *other)
47 {
48  gi.sound(self, CHAN_VOICE, sound_sight, 1, ATTN_NORM, 0);
49 }
50 
51 void brain_search(edict_t *self)
52 {
53  gi.sound(self, CHAN_VOICE, sound_search, 1, ATTN_NORM, 0);
54 }
55 
56 
57 void brain_run(edict_t *self);
58 void brain_dead(edict_t *self);
59 
60 
61 //
62 // STAND
63 //
64 
66  { ai_stand, 0, NULL },
67  { ai_stand, 0, NULL },
68  { ai_stand, 0, NULL },
69  { ai_stand, 0, NULL },
70  { ai_stand, 0, NULL },
71  { ai_stand, 0, NULL },
72  { ai_stand, 0, NULL },
73  { ai_stand, 0, NULL },
74  { ai_stand, 0, NULL },
75  { ai_stand, 0, NULL },
76 
77  { ai_stand, 0, NULL },
78  { ai_stand, 0, NULL },
79  { ai_stand, 0, NULL },
80  { ai_stand, 0, NULL },
81  { ai_stand, 0, NULL },
82  { ai_stand, 0, NULL },
83  { ai_stand, 0, NULL },
84  { ai_stand, 0, NULL },
85  { ai_stand, 0, NULL },
86  { ai_stand, 0, NULL },
87 
88  { ai_stand, 0, NULL },
89  { ai_stand, 0, NULL },
90  { ai_stand, 0, NULL },
91  { ai_stand, 0, NULL },
92  { ai_stand, 0, NULL },
93  { ai_stand, 0, NULL },
94  { ai_stand, 0, NULL },
95  { ai_stand, 0, NULL },
96  { ai_stand, 0, NULL },
97  { ai_stand, 0, NULL }
98 };
100 
101 void brain_stand(edict_t *self)
102 {
103  self->monsterinfo.currentmove = &brain_move_stand;
104 }
105 
106 
107 //
108 // IDLE
109 //
110 
112  { ai_stand, 0, NULL },
113  { ai_stand, 0, NULL },
114  { ai_stand, 0, NULL },
115  { ai_stand, 0, NULL },
116  { ai_stand, 0, NULL },
117  { ai_stand, 0, NULL },
118  { ai_stand, 0, NULL },
119  { ai_stand, 0, NULL },
120  { ai_stand, 0, NULL },
121  { ai_stand, 0, NULL },
122 
123  { ai_stand, 0, NULL },
124  { ai_stand, 0, NULL },
125  { ai_stand, 0, NULL },
126  { ai_stand, 0, NULL },
127  { ai_stand, 0, NULL },
128  { ai_stand, 0, NULL },
129  { ai_stand, 0, NULL },
130  { ai_stand, 0, NULL },
131  { ai_stand, 0, NULL },
132  { ai_stand, 0, NULL },
133 
134  { ai_stand, 0, NULL },
135  { ai_stand, 0, NULL },
136  { ai_stand, 0, NULL },
137  { ai_stand, 0, NULL },
138  { ai_stand, 0, NULL },
139  { ai_stand, 0, NULL },
140  { ai_stand, 0, NULL },
141  { ai_stand, 0, NULL },
142  { ai_stand, 0, NULL },
143  { ai_stand, 0, NULL }
144 };
146 
147 void brain_idle(edict_t *self)
148 {
149  gi.sound(self, CHAN_AUTO, sound_idle3, 1, ATTN_IDLE, 0);
150  self->monsterinfo.currentmove = &brain_move_idle;
151 }
152 
153 
154 //
155 // WALK
156 //
158  { ai_walk, 7, NULL },
159  { ai_walk, 2, NULL },
160  { ai_walk, 3, NULL },
161  { ai_walk, 3, NULL },
162  { ai_walk, 1, NULL },
163  { ai_walk, 0, NULL },
164  { ai_walk, 0, NULL },
165  { ai_walk, 9, NULL },
166  { ai_walk, -4, NULL },
167  { ai_walk, -1, NULL },
168  { ai_walk, 2, NULL }
169 };
171 
172 // walk2 is FUBAR, do not use
173 #if 0
174 void brain_walk2_cycle(edict_t *self)
175 {
176  if (random() > 0.1)
177  self->monsterinfo.nextframe = FRAME_walk220;
178 }
179 
180 mframe_t brain_frames_walk2 [] = {
181  { ai_walk, 3, NULL },
182  { ai_walk, -2, NULL },
183  { ai_walk, -4, NULL },
184  { ai_walk, -3, NULL },
185  { ai_walk, 0, NULL },
186  { ai_walk, 1, NULL },
187  { ai_walk, 12, NULL },
188  { ai_walk, 0, NULL },
189  { ai_walk, -3, NULL },
190  { ai_walk, 0, NULL },
191 
192  { ai_walk, -2, NULL },
193  { ai_walk, 0, NULL },
194  { ai_walk, 0, NULL },
195  { ai_walk, 1, NULL },
196  { ai_walk, 0, NULL },
197  { ai_walk, 0, NULL },
198  { ai_walk, 0, NULL },
199  { ai_walk, 0, NULL },
200  { ai_walk, 0, NULL },
201  { ai_walk, 10, NULL }, // Cycle Start
202 
203  { ai_walk, -1, NULL },
204  { ai_walk, 7, NULL },
205  { ai_walk, 0, NULL },
206  { ai_walk, 3, NULL },
207  { ai_walk, -3, NULL },
208  { ai_walk, 2, NULL },
209  { ai_walk, 4, NULL },
210  { ai_walk, -3, NULL },
211  { ai_walk, 2, NULL },
212  { ai_walk, 0, NULL },
213 
214  {
215  ai_walk, 4, brain_walk2_cycle,
216  { ai_walk, -1, NULL },
217  { ai_walk, -1, NULL },
218  { ai_walk, -8, NULL },
219  { ai_walk, 0, NULL },
220  { ai_walk, 1, NULL },
221  { ai_walk, 5, NULL },
222  { ai_walk, 2, NULL },
223  { ai_walk, -1, NULL },
224  {
225  ai_walk, -5, NULL
226  };
227  mmove_t brain_move_walk2 = {FRAME_walk201, FRAME_walk240, brain_frames_walk2, NULL};
228  }
229 #endif
230 
231 void brain_walk(edict_t *self) {
232 // if (random() <= 0.5)
233  self->monsterinfo.currentmove = &brain_move_walk1;
234 // else
235 // self->monsterinfo.currentmove = &brain_move_walk2;
236 }
237 
238 
239 
241 {
242  { ai_move, 0, NULL },
243  { ai_move, 0, NULL },
244  { ai_move, 0, NULL },
245  { ai_move, 0, NULL },
246  { ai_move, 0, NULL },
247  { ai_move, 0, NULL },
248  { ai_move, 0, NULL },
249  { ai_move, 0, NULL },
250  { ai_move, 0, NULL }
251 };
253 
255 {
256  { ai_move, -2, NULL },
257  { ai_move, 2, NULL },
258  { ai_move, 1, NULL },
259  { ai_move, 3, NULL },
260  { ai_move, 0, NULL },
261  { ai_move, -4, NULL }
262 };
264 
266 {
267  { ai_move, -2, NULL },
268  { ai_move, 0, NULL },
269  { ai_move, 0, NULL },
270  { ai_move, 0, NULL },
271  { ai_move, 0, NULL },
272  { ai_move, 3, NULL },
273  { ai_move, 1, NULL },
274  { ai_move, -2, NULL }
275 };
277 
279 {
280  { ai_move, -6, NULL },
281  { ai_move, -2, NULL },
282  { ai_move, -6, NULL },
283  { ai_move, 0, NULL },
284  { ai_move, 0, NULL },
285  { ai_move, 0, NULL },
286  { ai_move, 0, NULL },
287  { ai_move, 0, NULL },
288  { ai_move, 0, NULL },
289  { ai_move, 0, NULL },
290  { ai_move, 0, NULL },
291  { ai_move, 0, NULL },
292  { ai_move, 0, NULL },
293  { ai_move, 2, NULL },
294  { ai_move, 0, NULL },
295  { ai_move, 2, NULL },
296  { ai_move, 1, NULL },
297  { ai_move, 7, NULL },
298  { ai_move, 0, NULL },
299  { ai_move, 3, NULL },
300  { ai_move, -1, NULL }
301 };
303 
304 
305 //
306 // DUCK
307 //
308 
309 void brain_duck_down(edict_t *self) {
310  if (self->monsterinfo.aiflags & AI_DUCKED)
311  return;
312  self->monsterinfo.aiflags |= AI_DUCKED;
313  self->maxs[2] -= 32;
314  self->takedamage = DAMAGE_YES;
315  gi.linkentity(self);
316 }
317 
318 void brain_duck_hold(edict_t *self) {
319  if (level.time >= self->monsterinfo.pausetime)
320  self->monsterinfo.aiflags &= ~AI_HOLD_FRAME;
321  else
322  self->monsterinfo.aiflags |= AI_HOLD_FRAME;
323 }
324 
325 void brain_duck_up(edict_t *self) {
326  self->monsterinfo.aiflags &= ~AI_DUCKED;
327  self->maxs[2] += 32;
328  self->takedamage = DAMAGE_AIM;
329  gi.linkentity(self);
330 }
331 
333 {
334  { ai_move, 0, NULL },
335  { ai_move, -2, brain_duck_down },
336  { ai_move, 17, brain_duck_hold },
337  { ai_move, -3, NULL },
338  { ai_move, -1, brain_duck_up },
339  { ai_move, -5, NULL },
340  { ai_move, -6, NULL },
341  { ai_move, -6, NULL }
342 };
344 
345 void brain_dodge(edict_t *self, edict_t *attacker, float eta) {
346  if (random() > 0.25)
347  return;
348 
349  if (!self->enemy)
350  self->enemy = attacker;
351 
352  self->monsterinfo.pausetime = level.time + eta + 0.5;
353  self->monsterinfo.currentmove = &brain_move_duck;
354 }
355 
356 
358 {
359  { ai_move, 0, NULL },
360  { ai_move, 0, NULL },
361  { ai_move, 0, NULL },
362  { ai_move, 9, NULL },
363  { ai_move, 0, NULL }
364 };
366 
368 {
369  { ai_move, 0, NULL },
370  { ai_move, 0, NULL },
371  { ai_move, -2, NULL },
372  { ai_move, 9, NULL },
373  { ai_move, 0, NULL },
374  { ai_move, 0, NULL },
375  { ai_move, 0, NULL },
376  { ai_move, 0, NULL },
377  { ai_move, 0, NULL },
378  { ai_move, 0, NULL },
379  { ai_move, 0, NULL },
380  { ai_move, 0, NULL },
381  { ai_move, 0, NULL },
382  { ai_move, 0, NULL },
383  { ai_move, 0, NULL },
384  { ai_move, 0, NULL },
385  { ai_move, 0, NULL },
386  { ai_move, 0, NULL }
387 };
389 
390 
391 //
392 // MELEE
393 //
394 
395 void brain_swing_right(edict_t *self) {
396  gi.sound(self, CHAN_BODY, sound_melee1, 1, ATTN_NORM, 0);
397 }
398 
399 void brain_hit_right(edict_t *self) {
400  vec3_t aim;
401 
402  VectorSet(aim, MELEE_DISTANCE, self->maxs[0], 8);
403  if (fire_hit(self, aim, (15 + (rand() % 5)), 40))
404  gi.sound(self, CHAN_WEAPON, sound_melee3, 1, ATTN_NORM, 0);
405 }
406 
407 void brain_swing_left(edict_t *self) {
408  gi.sound(self, CHAN_BODY, sound_melee2, 1, ATTN_NORM, 0);
409 }
410 
411 void brain_hit_left(edict_t *self) {
412  vec3_t aim;
413 
414  VectorSet(aim, MELEE_DISTANCE, self->mins[0], 8);
415  if (fire_hit(self, aim, (15 + (rand() % 5)), 40))
416  gi.sound(self, CHAN_WEAPON, sound_melee3, 1, ATTN_NORM, 0);
417 }
418 
420 {
421  { ai_charge, 8, NULL },
422  { ai_charge, 3, NULL },
423  { ai_charge, 5, NULL },
424  { ai_charge, 0, NULL },
425  { ai_charge, -3, brain_swing_right },
426  { ai_charge, 0, NULL },
427  { ai_charge, -5, NULL },
428  { ai_charge, -7, brain_hit_right },
429  { ai_charge, 0, NULL },
430  { ai_charge, 6, brain_swing_left },
431  { ai_charge, 1, NULL },
432  { ai_charge, 2, brain_hit_left },
433  { ai_charge, -3, NULL },
434  { ai_charge, 6, NULL },
435  { ai_charge, -1, NULL },
436  { ai_charge, -3, NULL },
437  { ai_charge, 2, NULL },
438  { ai_charge, -11, NULL }
439 };
441 
442 void brain_chest_open(edict_t *self) {
443  self->spawnflags &= ~65536;
444  self->monsterinfo.power_armor_type = POWER_ARMOR_NONE;
445  gi.sound(self, CHAN_BODY, sound_chest_open, 1, ATTN_NORM, 0);
446 }
447 
448 void brain_tentacle_attack(edict_t *self) {
449  vec3_t aim;
450 
451  VectorSet(aim, MELEE_DISTANCE, 0, 8);
452  if (fire_hit(self, aim, (10 + (rand() % 5)), -600) && skill->value > 0)
453  self->spawnflags |= 65536;
454  gi.sound(self, CHAN_WEAPON, sound_tentacles_retract, 1, ATTN_NORM, 0);
455 }
456 
457 void brain_chest_closed(edict_t *self) {
458  self->monsterinfo.power_armor_type = POWER_ARMOR_SCREEN;
459  if (self->spawnflags & 65536) {
460  self->spawnflags &= ~65536;
461  self->monsterinfo.currentmove = &brain_move_attack1;
462  }
463 }
464 
466 {
467  { ai_charge, 5, NULL },
468  { ai_charge, -4, NULL },
469  { ai_charge, -4, NULL },
470  { ai_charge, -3, NULL },
471  { ai_charge, 0, brain_chest_open },
472  { ai_charge, 0, NULL },
474  { ai_charge, 0, NULL },
475  { ai_charge, 2, NULL },
476  { ai_charge, 0, NULL },
477  { ai_charge, -9, brain_chest_closed },
478  { ai_charge, 0, NULL },
479  { ai_charge, 4, NULL },
480  { ai_charge, 3, NULL },
481  { ai_charge, 2, NULL },
482  { ai_charge, -3, NULL },
483  { ai_charge, -6, NULL }
484 };
486 
487 void brain_melee(edict_t *self) {
488  if (random() <= 0.5)
489  self->monsterinfo.currentmove = &brain_move_attack1;
490  else
491  self->monsterinfo.currentmove = &brain_move_attack2;
492 }
493 
494 
495 //
496 // RUN
497 //
498 
500 {
501  { ai_run, 9, NULL },
502  { ai_run, 2, NULL },
503  { ai_run, 3, NULL },
504  { ai_run, 3, NULL },
505  { ai_run, 1, NULL },
506  { ai_run, 0, NULL },
507  { ai_run, 0, NULL },
508  { ai_run, 10, NULL },
509  { ai_run, -4, NULL },
510  { ai_run, -1, NULL },
511  { ai_run, 2, NULL }
512 };
514 
515 void brain_run(edict_t *self) {
516  self->monsterinfo.power_armor_type = POWER_ARMOR_SCREEN;
517  if (self->monsterinfo.aiflags & AI_STAND_GROUND)
518  self->monsterinfo.currentmove = &brain_move_stand;
519  else
520  self->monsterinfo.currentmove = &brain_move_run;
521 }
522 
523 
524 void brain_pain(edict_t *self, edict_t *other, float kick, int damage) {
525  float r;
526 
527  if (self->health < (self->max_health / 2))
528  self->s.skinnum = 1;
529 
530  if (level.time < self->pain_debounce_time)
531  return;
532 
533  self->pain_debounce_time = level.time + 3;
534  if (skill->value == 3)
535  return; // no pain anims in nightmare
536 
537  r = random();
538  if (r < 0.33) {
539  gi.sound(self, CHAN_VOICE, sound_pain1, 1, ATTN_NORM, 0);
540  self->monsterinfo.currentmove = &brain_move_pain1;
541  } else if (r < 0.66) {
542  gi.sound(self, CHAN_VOICE, sound_pain2, 1, ATTN_NORM, 0);
543  self->monsterinfo.currentmove = &brain_move_pain2;
544  } else {
545  gi.sound(self, CHAN_VOICE, sound_pain1, 1, ATTN_NORM, 0);
546  self->monsterinfo.currentmove = &brain_move_pain3;
547  }
548 }
549 
550 void brain_dead(edict_t *self) {
551  VectorSet(self->mins, -16, -16, -24);
552  VectorSet(self->maxs, 16, 16, -8);
553  self->movetype = MOVETYPE_TOSS;
554  self->svflags |= SVF_DEADMONSTER;
555  self->nextthink = 0;
556  gi.linkentity(self);
557 }
558 
559 
560 
561 void brain_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point) {
562  int n;
563 
564  self->s.effects = 0;
565  self->monsterinfo.power_armor_type = POWER_ARMOR_NONE;
566 
567 // check for gib
568  if (self->health <= self->gib_health) {
569  gi.sound(self, CHAN_VOICE, gi.soundindex("misc/udeath.wav"), 1, ATTN_NORM, 0);
570  for (n = 0; n < 2; n++)
571  ThrowGib(self, "models/objects/gibs/bone/tris.md2", damage, GIB_ORGANIC);
572  for (n = 0; n < 4; n++)
573  ThrowGib(self, "models/objects/gibs/sm_meat/tris.md2", damage, GIB_ORGANIC);
574  ThrowHead(self, "models/objects/gibs/head2/tris.md2", damage, GIB_ORGANIC);
575  self->deadflag = DEAD_DEAD;
576  return;
577  }
578 
579  if (self->deadflag == DEAD_DEAD)
580  return;
581 
582 // regular death
583  gi.sound(self, CHAN_VOICE, sound_death, 1, ATTN_NORM, 0);
584  self->deadflag = DEAD_DEAD;
585  self->takedamage = DAMAGE_YES;
586  if (random() <= 0.5)
587  self->monsterinfo.currentmove = &brain_move_death1;
588  else
589  self->monsterinfo.currentmove = &brain_move_death2;
590 }
591 
592 /*QUAKED monster_brain (1 .5 0) (-16 -16 -24) (16 16 32) Ambush Trigger_Spawn Sight
593 */
594 void SP_monster_brain(edict_t *self) {
595  if (deathmatch->value) {
596  G_FreeEdict(self);
597  return;
598  }
599 
600  sound_chest_open = gi.soundindex("brain/brnatck1.wav");
601  sound_tentacles_extend = gi.soundindex("brain/brnatck2.wav");
602  sound_tentacles_retract = gi.soundindex("brain/brnatck3.wav");
603  sound_death = gi.soundindex("brain/brndeth1.wav");
604  sound_idle1 = gi.soundindex("brain/brnidle1.wav");
605  sound_idle2 = gi.soundindex("brain/brnidle2.wav");
606  sound_idle3 = gi.soundindex("brain/brnlens1.wav");
607  sound_pain1 = gi.soundindex("brain/brnpain1.wav");
608  sound_pain2 = gi.soundindex("brain/brnpain2.wav");
609  sound_sight = gi.soundindex("brain/brnsght1.wav");
610  sound_search = gi.soundindex("brain/brnsrch1.wav");
611  sound_melee1 = gi.soundindex("brain/melee1.wav");
612  sound_melee2 = gi.soundindex("brain/melee2.wav");
613  sound_melee3 = gi.soundindex("brain/melee3.wav");
614 
615  self->movetype = MOVETYPE_STEP;
616  self->solid = SOLID_BBOX;
617  self->s.modelindex = gi.modelindex("models/monsters/brain/tris.md2");
618  VectorSet(self->mins, -16, -16, -24);
619  VectorSet(self->maxs, 16, 16, 32);
620 
621  self->health = 300;
622  self->gib_health = -150;
623  self->mass = 400;
624 
625  self->pain = brain_pain;
626  self->die = brain_die;
627 
628  self->monsterinfo.stand = brain_stand;
629  self->monsterinfo.walk = brain_walk;
630  self->monsterinfo.run = brain_run;
631  self->monsterinfo.dodge = brain_dodge;
632 // self->monsterinfo.attack = brain_attack;
633  self->monsterinfo.melee = brain_melee;
634  self->monsterinfo.sight = brain_sight;
635  self->monsterinfo.search = brain_search;
636  self->monsterinfo.idle = brain_idle;
637 
638  self->monsterinfo.power_armor_type = POWER_ARMOR_SCREEN;
639  self->monsterinfo.power_armor_power = 100;
640 
641  gi.linkentity(self);
642 
643  self->monsterinfo.currentmove = &brain_move_stand;
644  self->monsterinfo.scale = MODEL_SCALE;
645 
646  walkmonster_start(self);
647 }
gi
game_import_t gi
Definition: g_main.c:23
FRAME_death201
#define FRAME_death201
Definition: m_actor.h:33
deathmatch
cvar_t * deathmatch
Definition: g_main.c:33
FRAME_duck01
#define FRAME_duck01
Definition: m_brain.h:168
DEAD_DEAD
#define DEAD_DEAD
Definition: g_local.h:112
sound_melee2
static int sound_melee2
Definition: m_brain.c:42
sound_melee1
static int sound_melee1
Definition: m_brain.c:41
FRAME_pain301
#define FRAME_pain301
Definition: m_actor.h:102
brain_move_attack2
mmove_t brain_move_attack2
Definition: m_brain.c:485
ThrowGib
void ThrowGib(edict_t *self, char *gibname, int damage, int type)
Definition: g_misc.c:130
MELEE_DISTANCE
#define MELEE_DISTANCE
Definition: g_local.h:82
brain_move_attack1
mmove_t brain_move_attack1
Definition: m_brain.c:440
brain_tentacle_attack
void brain_tentacle_attack(edict_t *self)
Definition: m_brain.c:448
ai_charge
void ai_charge(edict_t *self, float dist)
Definition: g_ai.c:175
FRAME_death205
#define FRAME_death205
Definition: m_actor.h:37
brain_frames_pain3
mframe_t brain_frames_pain3[]
Definition: m_brain.c:254
brain_frames_attack1
mframe_t brain_frames_attack1[]
Definition: m_brain.c:419
FRAME_stand01
#define FRAME_stand01
Definition: m_boss31.h:134
brain_duck_up
void brain_duck_up(edict_t *self)
Definition: m_brain.c:325
brain_frames_run
mframe_t brain_frames_run[]
Definition: m_brain.c:499
FRAME_walk240
#define FRAME_walk240
Definition: m_brain.h:74
FRAME_attak118
#define FRAME_attak118
Definition: m_boss31.h:39
FRAME_death101
#define FRAME_death101
Definition: m_actor.h:26
AI_STAND_GROUND
#define AI_STAND_GROUND
Definition: g_local.h:126
MODEL_SCALE
#define MODEL_SCALE
Definition: m_actor.h:504
DAMAGE_YES
@ DAMAGE_YES
Definition: g_local.h:88
brain_die
void brain_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: m_brain.c:561
brain_chest_open
void brain_chest_open(edict_t *self)
Definition: m_brain.c:442
SP_monster_brain
void SP_monster_brain(edict_t *self)
Definition: m_brain.c:594
fire_hit
qboolean fire_hit(edict_t *self, vec3_t aim, int damage, int kick)
Definition: g_weapon.c:59
FRAME_defens01
#define FRAME_defens01
Definition: m_brain.h:176
brain_move_run
mmove_t brain_move_run
Definition: m_brain.c:513
sound_chest_open
static int sound_chest_open
Definition: m_brain.c:30
other
@ other
Definition: ogg.c:63
FRAME_pain101
#define FRAME_pain101
Definition: m_actor.h:96
brain_frames_duck
mframe_t brain_frames_duck[]
Definition: m_brain.c:332
walkmonster_start
void walkmonster_start(edict_t *self)
Definition: g_monster.c:630
MOVETYPE_STEP
@ MOVETYPE_STEP
Definition: g_local.h:192
brain_swing_right
void brain_swing_right(edict_t *self)
Definition: m_brain.c:395
FRAME_walk111
#define FRAME_walk111
Definition: m_brain.h:32
brain_swing_left
void brain_swing_left(edict_t *self)
Definition: m_brain.c:407
brain_sight
void brain_sight(edict_t *self, edict_t *other)
Definition: m_brain.c:46
brain_walk
void brain_walk(edict_t *self)
Definition: m_brain.c:231
FRAME_defens08
#define FRAME_defens08
Definition: m_brain.h:183
FRAME_attak201
#define FRAME_attak201
Definition: m_boss31.h:40
POWER_ARMOR_SCREEN
#define POWER_ARMOR_SCREEN
Definition: g_local.h:157
brain_stand
void brain_stand(edict_t *self)
Definition: m_brain.c:101
brain_hit_left
void brain_hit_left(edict_t *self)
Definition: m_brain.c:411
FRAME_walk220
#define FRAME_walk220
Definition: m_brain.h:54
sound_sight
static int sound_sight
Definition: m_brain.c:39
G_FreeEdict
void G_FreeEdict(edict_t *e)
Definition: g_utils.c:421
sound_search
static int sound_search
Definition: m_brain.c:40
FRAME_stand30
#define FRAME_stand30
Definition: m_boss2.h:22
brain_idle
void brain_idle(edict_t *self)
Definition: m_brain.c:147
AI_HOLD_FRAME
#define AI_HOLD_FRAME
Definition: g_local.h:133
FRAME_pain121
#define FRAME_pain121
Definition: m_brain.h:130
brain_frames_death1
mframe_t brain_frames_death1[]
Definition: m_brain.c:367
brain_move_death2
mmove_t brain_move_death2
Definition: m_brain.c:365
FRAME_walk201
#define FRAME_walk201
Definition: m_boss32.h:496
mframe_t
Definition: g_local.h:394
mmove_t
Definition: g_local.h:400
brain_frames_pain2
mframe_t brain_frames_pain2[]
Definition: m_brain.c:265
FRAME_stand31
#define FRAME_stand31
Definition: m_boss2.h:23
FRAME_stand60
#define FRAME_stand60
Definition: m_brain.h:243
ai_walk
void ai_walk(edict_t *self, float dist)
Definition: g_ai.c:148
random
#define random()
Definition: g_local.h:504
brain_duck_hold
void brain_duck_hold(edict_t *self)
Definition: m_brain.c:318
brain_move_defense
mmove_t brain_move_defense
Definition: m_brain.c:252
sound_pain2
static int sound_pain2
Definition: m_brain.c:38
brain_move_duck
mmove_t brain_move_duck
Definition: m_brain.c:343
brain_pain
void brain_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: m_brain.c:524
skill
cvar_t * skill
Definition: g_main.c:36
brain_frames_walk1
mframe_t brain_frames_walk1[]
Definition: m_brain.c:157
sound_tentacles_retract
static int sound_tentacles_retract
Definition: m_brain.c:32
ai_move
void ai_move(edict_t *self, float dist)
Definition: g_ai.c:86
m_brain.h
FRAME_duck08
#define FRAME_duck08
Definition: m_brain.h:175
level_locals_t::time
float time
Definition: g_local.h:299
brain_frames_death2
mframe_t brain_frames_death2[]
Definition: m_brain.c:357
FRAME_pain306
#define FRAME_pain306
Definition: m_boss31.h:114
sound_melee3
static int sound_melee3
Definition: m_brain.c:43
brain_melee
void brain_melee(edict_t *self)
Definition: m_brain.c:487
brain_frames_pain1
mframe_t brain_frames_pain1[]
Definition: m_brain.c:278
DAMAGE_AIM
@ DAMAGE_AIM
Definition: g_local.h:89
ai_run
void ai_run(edict_t *self, float dist)
Definition: g_ai.c:821
GIB_ORGANIC
#define GIB_ORGANIC
Definition: g_local.h:122
FRAME_pain208
#define FRAME_pain208
Definition: m_brain.h:138
brain_frames_idle
mframe_t brain_frames_idle[]
Definition: m_brain.c:111
level
level_locals_t level
Definition: g_main.c:22
brain_hit_right
void brain_hit_right(edict_t *self)
Definition: m_brain.c:399
sound_tentacles_extend
static int sound_tentacles_extend
Definition: m_brain.c:31
ThrowHead
void ThrowHead(edict_t *self, char *gibname, int damage, int type)
Definition: g_misc.c:175
FRAME_pain201
#define FRAME_pain201
Definition: m_actor.h:99
sound_idle3
static int sound_idle3
Definition: m_brain.c:36
brain_chest_closed
void brain_chest_closed(edict_t *self)
Definition: m_brain.c:457
sound_death
static int sound_death
Definition: m_brain.c:33
MOVETYPE_TOSS
@ MOVETYPE_TOSS
Definition: g_local.h:194
FRAME_attak217
#define FRAME_attak217
Definition: m_brain.h:109
FRAME_death118
#define FRAME_death118
Definition: m_brain.h:162
brain_move_death1
mmove_t brain_move_death1
Definition: m_brain.c:388
brain_frames_stand
mframe_t brain_frames_stand[]
Definition: m_brain.c:65
brain_run
void brain_run(edict_t *self)
Definition: m_brain.c:515
sound_idle2
static int sound_idle2
Definition: m_brain.c:35
AI_DUCKED
#define AI_DUCKED
Definition: g_local.h:137
brain_move_pain1
mmove_t brain_move_pain1
Definition: m_brain.c:302
brain_dead
void brain_dead(edict_t *self)
Definition: m_brain.c:550
sound_idle1
static int sound_idle1
Definition: m_brain.c:34
brain_move_stand
mmove_t brain_move_stand
Definition: m_brain.c:99
brain_move_pain3
mmove_t brain_move_pain3
Definition: m_brain.c:263
brain_move_walk1
mmove_t brain_move_walk1
Definition: m_brain.c:170
FRAME_walk101
#define FRAME_walk101
Definition: m_brain.h:22
brain_dodge
void brain_dodge(edict_t *self, edict_t *attacker, float eta)
Definition: m_brain.c:345
brain_search
void brain_search(edict_t *self)
Definition: m_brain.c:51
brain_duck_down
void brain_duck_down(edict_t *self)
Definition: m_brain.c:309
POWER_ARMOR_NONE
#define POWER_ARMOR_NONE
Definition: g_local.h:156
ai_stand
void ai_stand(edict_t *self, float dist)
Definition: g_ai.c:100
brain_move_pain2
mmove_t brain_move_pain2
Definition: m_brain.c:276
sound_pain1
static int sound_pain1
Definition: m_brain.c:37
brain_frames_attack2
mframe_t brain_frames_attack2[]
Definition: m_brain.c:465
FRAME_attak101
#define FRAME_attak101
Definition: m_boss31.h:22
g_local.h
brain_frames_defense
mframe_t brain_frames_defense[]
Definition: m_brain.c:240
brain_move_idle
mmove_t brain_move_idle
Definition: m_brain.c:145