vkQuake2 doxygen  1.0 dev
m_mutant.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
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (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.
12 
13 See the GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 
19 */
20 /*
21 ==============================================================================
22 
23 mutant
24 
25 ==============================================================================
26 */
27 
28 #include "g_local.h"
29 #include "m_mutant.h"
30 
31 
32 static int sound_swing;
33 static int sound_hit;
34 static int sound_hit2;
35 static int sound_death;
36 static int sound_idle;
37 static int sound_pain1;
38 static int sound_pain2;
39 static int sound_sight;
40 static int sound_search;
41 static int sound_step1;
42 static int sound_step2;
43 static int sound_step3;
44 static int sound_thud;
45 
46 //
47 // SOUNDS
48 //
49 
50 void mutant_step (edict_t *self)
51 {
52  int n;
53  n = (rand() + 1) % 3;
54  if (n == 0)
55  gi.sound (self, CHAN_VOICE, sound_step1, 1, ATTN_NORM, 0);
56  else if (n == 1)
57  gi.sound (self, CHAN_VOICE, sound_step2, 1, ATTN_NORM, 0);
58  else
59  gi.sound (self, CHAN_VOICE, sound_step3, 1, ATTN_NORM, 0);
60 }
61 
62 void mutant_sight (edict_t *self, edict_t *other)
63 {
64  gi.sound (self, CHAN_VOICE, sound_sight, 1, ATTN_NORM, 0);
65 }
66 
67 void mutant_search (edict_t *self)
68 {
69  gi.sound (self, CHAN_VOICE, sound_search, 1, ATTN_NORM, 0);
70 }
71 
72 void mutant_swing (edict_t *self)
73 {
74  gi.sound (self, CHAN_VOICE, sound_swing, 1, ATTN_NORM, 0);
75 }
76 
77 
78 //
79 // STAND
80 //
81 
83 {
84  ai_stand, 0, NULL,
85  ai_stand, 0, NULL,
86  ai_stand, 0, NULL,
87  ai_stand, 0, NULL,
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, // 10
94 
95  ai_stand, 0, NULL,
96  ai_stand, 0, NULL,
97  ai_stand, 0, NULL,
98  ai_stand, 0, NULL,
99  ai_stand, 0, NULL,
100  ai_stand, 0, NULL,
101  ai_stand, 0, NULL,
102  ai_stand, 0, NULL,
103  ai_stand, 0, NULL,
104  ai_stand, 0, NULL, // 20
105 
106  ai_stand, 0, NULL,
107  ai_stand, 0, NULL,
108  ai_stand, 0, NULL,
109  ai_stand, 0, NULL,
110  ai_stand, 0, NULL,
111  ai_stand, 0, NULL,
112  ai_stand, 0, NULL,
113  ai_stand, 0, NULL,
114  ai_stand, 0, NULL,
115  ai_stand, 0, NULL, // 30
116 
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  ai_stand, 0, NULL,
123  ai_stand, 0, NULL,
124  ai_stand, 0, NULL,
125  ai_stand, 0, NULL,
126  ai_stand, 0, NULL, // 40
127 
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  ai_stand, 0, NULL,
134  ai_stand, 0, NULL,
135  ai_stand, 0, NULL,
136  ai_stand, 0, NULL,
137  ai_stand, 0, NULL, // 50
138 
139  ai_stand, 0, NULL
140 };
142 
143 void mutant_stand (edict_t *self)
144 {
145  self->monsterinfo.currentmove = &mutant_move_stand;
146 }
147 
148 
149 //
150 // IDLE
151 //
152 
154 {
155  if (random() < 0.75)
156  self->monsterinfo.nextframe = FRAME_stand155;
157 }
158 
160 {
161  ai_stand, 0, NULL,
162  ai_stand, 0, NULL,
163  ai_stand, 0, NULL,
164  ai_stand, 0, NULL, // scratch loop start
165  ai_stand, 0, NULL,
166  ai_stand, 0, NULL,
167  ai_stand, 0, mutant_idle_loop, // scratch loop end
168  ai_stand, 0, NULL,
169  ai_stand, 0, NULL,
170  ai_stand, 0, NULL,
171  ai_stand, 0, NULL,
172  ai_stand, 0, NULL,
173  ai_stand, 0, NULL
174 };
176 
177 void mutant_idle (edict_t *self)
178 {
179  self->monsterinfo.currentmove = &mutant_move_idle;
180  gi.sound (self, CHAN_VOICE, sound_idle, 1, ATTN_IDLE, 0);
181 }
182 
183 
184 //
185 // WALK
186 //
187 
188 void mutant_walk (edict_t *self);
189 
191 {
192  ai_walk, 3, NULL,
193  ai_walk, 1, NULL,
194  ai_walk, 5, NULL,
195  ai_walk, 10, NULL,
196  ai_walk, 13, NULL,
197  ai_walk, 10, NULL,
198  ai_walk, 0, NULL,
199  ai_walk, 5, NULL,
200  ai_walk, 6, NULL,
201  ai_walk, 16, NULL,
202  ai_walk, 15, NULL,
203  ai_walk, 6, NULL
204 };
206 
208 {
209  self->monsterinfo.currentmove = &mutant_move_walk;
210 }
211 
213 {
214  ai_walk, 5, NULL,
215  ai_walk, 5, NULL,
216  ai_walk, -2, NULL,
217  ai_walk, 1, NULL
218 };
220 
221 void mutant_walk (edict_t *self)
222 {
223  self->monsterinfo.currentmove = &mutant_move_start_walk;
224 }
225 
226 
227 //
228 // RUN
229 //
230 
232 {
233  ai_run, 40, NULL,
234  ai_run, 40, mutant_step,
235  ai_run, 24, NULL,
236  ai_run, 5, mutant_step,
237  ai_run, 17, NULL,
238  ai_run, 10, NULL
239 };
241 
242 void mutant_run (edict_t *self)
243 {
244  if (self->monsterinfo.aiflags & AI_STAND_GROUND)
245  self->monsterinfo.currentmove = &mutant_move_stand;
246  else
247  self->monsterinfo.currentmove = &mutant_move_run;
248 }
249 
250 
251 //
252 // MELEE
253 //
254 
256 {
257  vec3_t aim;
258 
259  VectorSet (aim, MELEE_DISTANCE, self->mins[0], 8);
260  if (fire_hit (self, aim, (10 + (rand() %5)), 100))
261  gi.sound (self, CHAN_WEAPON, sound_hit, 1, ATTN_NORM, 0);
262  else
263  gi.sound (self, CHAN_WEAPON, sound_swing, 1, ATTN_NORM, 0);
264 }
265 
267 {
268  vec3_t aim;
269 
270  VectorSet (aim, MELEE_DISTANCE, self->maxs[0], 8);
271  if (fire_hit (self, aim, (10 + (rand() %5)), 100))
272  gi.sound (self, CHAN_WEAPON, sound_hit2, 1, ATTN_NORM, 0);
273  else
274  gi.sound (self, CHAN_WEAPON, sound_swing, 1, ATTN_NORM, 0);
275 }
276 
278 {
279  if (!self->enemy || !self->enemy->inuse || self->enemy->health <= 0)
280  return;
281 
282  if ( ((skill->value == 3) && (random() < 0.5)) || (range(self, self->enemy) == RANGE_MELEE) )
283  self->monsterinfo.nextframe = FRAME_attack09;
284 }
285 
287 {
288  ai_charge, 0, NULL,
289  ai_charge, 0, NULL,
291  ai_charge, 0, NULL,
292  ai_charge, 0, NULL,
295 };
297 
298 void mutant_melee (edict_t *self)
299 {
300  self->monsterinfo.currentmove = &mutant_move_attack;
301 }
302 
303 
304 //
305 // ATTACK
306 //
307 
308 void mutant_jump_touch (edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
309 {
310  if (self->health <= 0)
311  {
312  self->touch = NULL;
313  return;
314  }
315 
316  if (other->takedamage)
317  {
318  if (VectorLength(self->velocity) > 400)
319  {
320  vec3_t point;
321  vec3_t normal;
322  int damage;
323 
324  VectorCopy (self->velocity, normal);
325  VectorNormalize(normal);
326  VectorMA (self->s.origin, self->maxs[0], normal, point);
327  damage = 40 + 10 * random();
328  T_Damage (other, self, self, self->velocity, point, normal, damage, damage, 0, MOD_UNKNOWN);
329  }
330  }
331 
332  if (!M_CheckBottom (self))
333  {
334  if (self->groundentity)
335  {
336  self->monsterinfo.nextframe = FRAME_attack02;
337  self->touch = NULL;
338  }
339  return;
340  }
341 
342  self->touch = NULL;
343 }
344 
346 {
347  vec3_t forward;
348 
349  gi.sound (self, CHAN_VOICE, sound_sight, 1, ATTN_NORM, 0);
350  AngleVectors (self->s.angles, forward, NULL, NULL);
351  self->s.origin[2] += 1;
352  VectorScale (forward, 600, self->velocity);
353  self->velocity[2] = 250;
354  self->groundentity = NULL;
355  self->monsterinfo.aiflags |= AI_DUCKED;
356  self->monsterinfo.attack_finished = level.time + 3;
357  self->touch = mutant_jump_touch;
358 }
359 
361 {
362  if (self->groundentity)
363  {
364  gi.sound (self, CHAN_WEAPON, sound_thud, 1, ATTN_NORM, 0);
365  self->monsterinfo.attack_finished = 0;
366  self->monsterinfo.aiflags &= ~AI_DUCKED;
367  return;
368  }
369 
370  if (level.time > self->monsterinfo.attack_finished)
371  self->monsterinfo.nextframe = FRAME_attack02;
372  else
373  self->monsterinfo.nextframe = FRAME_attack05;
374 }
375 
377 {
378  ai_charge, 0, NULL,
379  ai_charge, 17, NULL,
381  ai_charge, 15, NULL,
383  ai_charge, 0, NULL,
384  ai_charge, 3, NULL,
385  ai_charge, 0, NULL
386 };
388 
389 void mutant_jump (edict_t *self)
390 {
391  self->monsterinfo.currentmove = &mutant_move_jump;
392 }
393 
394 
395 //
396 // CHECKATTACK
397 //
398 
400 {
401  if (range (self, self->enemy) == RANGE_MELEE)
402  return true;
403  return false;
404 }
405 
407 {
408  vec3_t v;
409  float distance;
410 
411  if (self->absmin[2] > (self->enemy->absmin[2] + 0.75 * self->enemy->size[2]))
412  return false;
413 
414  if (self->absmax[2] < (self->enemy->absmin[2] + 0.25 * self->enemy->size[2]))
415  return false;
416 
417  v[0] = self->s.origin[0] - self->enemy->s.origin[0];
418  v[1] = self->s.origin[1] - self->enemy->s.origin[1];
419  v[2] = 0;
420  distance = VectorLength(v);
421 
422  if (distance < 100)
423  return false;
424  if (distance > 100)
425  {
426  if (random() < 0.9)
427  return false;
428  }
429 
430  return true;
431 }
432 
434 {
435  if (!self->enemy || self->enemy->health <= 0)
436  return false;
437 
438  if (mutant_check_melee(self))
439  {
440  self->monsterinfo.attack_state = AS_MELEE;
441  return true;
442  }
443 
444  if (mutant_check_jump(self))
445  {
446  self->monsterinfo.attack_state = AS_MISSILE;
447  // FIXME play a jump sound here
448  return true;
449  }
450 
451  return false;
452 }
453 
454 
455 //
456 // PAIN
457 //
458 
460 {
461  ai_move, 4, NULL,
462  ai_move, -3, NULL,
463  ai_move, -8, NULL,
464  ai_move, 2, NULL,
465  ai_move, 5, NULL
466 };
468 
470 {
471  ai_move, -24,NULL,
472  ai_move, 11, NULL,
473  ai_move, 5, NULL,
474  ai_move, -2, NULL,
475  ai_move, 6, NULL,
476  ai_move, 4, NULL
477 };
479 
481 {
482  ai_move, -22,NULL,
483  ai_move, 3, NULL,
484  ai_move, 3, NULL,
485  ai_move, 2, NULL,
486  ai_move, 1, NULL,
487  ai_move, 1, NULL,
488  ai_move, 6, NULL,
489  ai_move, 3, NULL,
490  ai_move, 2, NULL,
491  ai_move, 0, NULL,
492  ai_move, 1, NULL
493 };
495 
496 void mutant_pain (edict_t *self, edict_t *other, float kick, int damage)
497 {
498  float r;
499 
500  if (self->health < (self->max_health / 2))
501  self->s.skinnum = 1;
502 
503  if (level.time < self->pain_debounce_time)
504  return;
505 
506  self->pain_debounce_time = level.time + 3;
507 
508  if (skill->value == 3)
509  return; // no pain anims in nightmare
510 
511  r = random();
512  if (r < 0.33)
513  {
514  gi.sound (self, CHAN_VOICE, sound_pain1, 1, ATTN_NORM, 0);
515  self->monsterinfo.currentmove = &mutant_move_pain1;
516  }
517  else if (r < 0.66)
518  {
519  gi.sound (self, CHAN_VOICE, sound_pain2, 1, ATTN_NORM, 0);
520  self->monsterinfo.currentmove = &mutant_move_pain2;
521  }
522  else
523  {
524  gi.sound (self, CHAN_VOICE, sound_pain1, 1, ATTN_NORM, 0);
525  self->monsterinfo.currentmove = &mutant_move_pain3;
526  }
527 }
528 
529 
530 //
531 // DEATH
532 //
533 
534 void mutant_dead (edict_t *self)
535 {
536  VectorSet (self->mins, -16, -16, -24);
537  VectorSet (self->maxs, 16, 16, -8);
538  self->movetype = MOVETYPE_TOSS;
539  self->svflags |= SVF_DEADMONSTER;
540  gi.linkentity (self);
541 
542  M_FlyCheck (self);
543 }
544 
546 {
547  ai_move, 0, NULL,
548  ai_move, 0, NULL,
549  ai_move, 0, NULL,
550  ai_move, 0, NULL,
551  ai_move, 0, NULL,
552  ai_move, 0, NULL,
553  ai_move, 0, NULL,
554  ai_move, 0, NULL,
555  ai_move, 0, NULL
556 };
558 
560 {
561  ai_move, 0, NULL,
562  ai_move, 0, NULL,
563  ai_move, 0, NULL,
564  ai_move, 0, NULL,
565  ai_move, 0, NULL,
566  ai_move, 0, NULL,
567  ai_move, 0, NULL,
568  ai_move, 0, NULL,
569  ai_move, 0, NULL,
570  ai_move, 0, NULL
571 };
573 
574 void mutant_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
575 {
576  int n;
577 
578  if (self->health <= self->gib_health)
579  {
580  gi.sound (self, CHAN_VOICE, gi.soundindex ("misc/udeath.wav"), 1, ATTN_NORM, 0);
581  for (n= 0; n < 2; n++)
582  ThrowGib (self, "models/objects/gibs/bone/tris.md2", damage, GIB_ORGANIC);
583  for (n= 0; n < 4; n++)
584  ThrowGib (self, "models/objects/gibs/sm_meat/tris.md2", damage, GIB_ORGANIC);
585  ThrowHead (self, "models/objects/gibs/head2/tris.md2", damage, GIB_ORGANIC);
586  self->deadflag = DEAD_DEAD;
587  return;
588  }
589 
590  if (self->deadflag == DEAD_DEAD)
591  return;
592 
593  gi.sound (self, CHAN_VOICE, sound_death, 1, ATTN_NORM, 0);
594  self->deadflag = DEAD_DEAD;
595  self->takedamage = DAMAGE_YES;
596  self->s.skinnum = 1;
597 
598  if (random() < 0.5)
599  self->monsterinfo.currentmove = &mutant_move_death1;
600  else
601  self->monsterinfo.currentmove = &mutant_move_death2;
602 }
603 
604 
605 //
606 // SPAWN
607 //
608 
609 /*QUAKED monster_mutant (1 .5 0) (-32 -32 -24) (32 32 32) Ambush Trigger_Spawn Sight
610 */
612 {
613  if (deathmatch->value)
614  {
615  G_FreeEdict (self);
616  return;
617  }
618 
619  sound_swing = gi.soundindex ("mutant/mutatck1.wav");
620  sound_hit = gi.soundindex ("mutant/mutatck2.wav");
621  sound_hit2 = gi.soundindex ("mutant/mutatck3.wav");
622  sound_death = gi.soundindex ("mutant/mutdeth1.wav");
623  sound_idle = gi.soundindex ("mutant/mutidle1.wav");
624  sound_pain1 = gi.soundindex ("mutant/mutpain1.wav");
625  sound_pain2 = gi.soundindex ("mutant/mutpain2.wav");
626  sound_sight = gi.soundindex ("mutant/mutsght1.wav");
627  sound_search = gi.soundindex ("mutant/mutsrch1.wav");
628  sound_step1 = gi.soundindex ("mutant/step1.wav");
629  sound_step2 = gi.soundindex ("mutant/step2.wav");
630  sound_step3 = gi.soundindex ("mutant/step3.wav");
631  sound_thud = gi.soundindex ("mutant/thud1.wav");
632 
633  self->movetype = MOVETYPE_STEP;
634  self->solid = SOLID_BBOX;
635  self->s.modelindex = gi.modelindex ("models/monsters/mutant/tris.md2");
636  VectorSet (self->mins, -32, -32, -24);
637  VectorSet (self->maxs, 32, 32, 48);
638 
639  self->health = 300;
640  self->gib_health = -120;
641  self->mass = 300;
642 
643  self->pain = mutant_pain;
644  self->die = mutant_die;
645 
646  self->monsterinfo.stand = mutant_stand;
647  self->monsterinfo.walk = mutant_walk;
648  self->monsterinfo.run = mutant_run;
649  self->monsterinfo.dodge = NULL;
650  self->monsterinfo.attack = mutant_jump;
651  self->monsterinfo.melee = mutant_melee;
652  self->monsterinfo.sight = mutant_sight;
653  self->monsterinfo.search = mutant_search;
654  self->monsterinfo.idle = mutant_idle;
655  self->monsterinfo.checkattack = mutant_checkattack;
656 
657  gi.linkentity (self);
658 
659  self->monsterinfo.currentmove = &mutant_move_stand;
660 
661  self->monsterinfo.scale = MODEL_SCALE;
662  walkmonster_start (self);
663 }
gi
game_import_t gi
Definition: g_main.c:25
FRAME_death201
#define FRAME_death201
Definition: m_actor.h:35
deathmatch
cvar_t * deathmatch
Definition: g_main.c:35
mutant_check_landing
void mutant_check_landing(edict_t *self)
Definition: m_mutant.c:360
DEAD_DEAD
#define DEAD_DEAD
Definition: g_local.h:115
mutant_sight
void mutant_sight(edict_t *self, edict_t *other)
Definition: m_mutant.c:62
FRAME_attack01
#define FRAME_attack01
Definition: m_mutant.h:24
FRAME_pain301
#define FRAME_pain301
Definition: m_actor.h:104
ThrowGib
void ThrowGib(edict_t *self, char *gibname, int damage, int type)
Definition: g_misc.c:135
MELEE_DISTANCE
#define MELEE_DISTANCE
Definition: g_local.h:82
FRAME_walk05
#define FRAME_walk05
Definition: m_actor.h:279
FRAME_attack09
#define FRAME_attack09
Definition: m_mutant.h:32
ai_charge
void ai_charge(edict_t *self, float dist)
Definition: g_ai.c:194
mutant_run
void mutant_run(edict_t *self)
Definition: m_mutant.c:242
SOLID_BBOX
@ SOLID_BBOX
Definition: game.h:37
FRAME_attack15
#define FRAME_attack15
Definition: m_boss2.h:108
mutant_move_death2
mmove_t mutant_move_death2
Definition: m_mutant.c:572
mutant_pain
void mutant_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: m_mutant.c:496
sound_step1
static int sound_step1
Definition: m_mutant.c:41
FRAME_death109
#define FRAME_death109
Definition: m_brain.h:155
FRAME_stand101
#define FRAME_stand101
Definition: m_actor.h:152
mutant_move_start_walk
mmove_t mutant_move_start_walk
Definition: m_mutant.c:219
v
GLdouble v
Definition: qgl_win.c:143
FRAME_walk16
#define FRAME_walk16
Definition: m_boss2.h:89
sound_search
static int sound_search
Definition: m_mutant.c:40
mutant_hit_left
void mutant_hit_left(edict_t *self)
Definition: m_mutant.c:255
sound_thud
static int sound_thud
Definition: m_mutant.c:44
mutant_jump
void mutant_jump(edict_t *self)
Definition: m_mutant.c:389
mutant_frames_jump
mframe_t mutant_frames_jump[]
Definition: m_mutant.c:376
sound_sight
static int sound_sight
Definition: m_mutant.c:39
FRAME_walk04
#define FRAME_walk04
Definition: m_actor.h:278
FRAME_death101
#define FRAME_death101
Definition: m_actor.h:28
mutant_step
void mutant_step(edict_t *self)
Definition: m_mutant.c:50
AI_STAND_GROUND
#define AI_STAND_GROUND
Definition: g_local.h:129
VectorScale
void VectorScale(vec3_t in, vec_t scale, vec3_t out)
Definition: q_shared.c:782
qboolean
qboolean
Definition: q_shared.h:63
mutant_move_pain2
mmove_t mutant_move_pain2
Definition: m_mutant.c:478
mutant_move_walk
mmove_t mutant_move_walk
Definition: m_mutant.c:205
mutant_move_pain3
mmove_t mutant_move_pain3
Definition: m_mutant.c:494
MODEL_SCALE
#define MODEL_SCALE
Definition: m_actor.h:506
mutant_check_melee
qboolean mutant_check_melee(edict_t *self)
Definition: m_mutant.c:399
mutant_frames_attack
mframe_t mutant_frames_attack[]
Definition: m_mutant.c:286
FRAME_attack05
#define FRAME_attack05
Definition: m_mutant.h:28
mutant_frames_run
mframe_t mutant_frames_run[]
Definition: m_mutant.c:231
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
ATTN_IDLE
#define ATTN_IDLE
Definition: q_shared.h:996
SP_monster_mutant
void SP_monster_mutant(edict_t *self)
Definition: m_mutant.c:611
range
GLsizei range
Definition: qgl_win.c:121
fire_hit
qboolean fire_hit(edict_t *self, vec3_t aim, int damage, int kick)
Definition: g_weapon.c:63
mutant_search
void mutant_search(edict_t *self)
Definition: m_mutant.c:67
mutant_frames_stand
mframe_t mutant_frames_stand[]
Definition: m_mutant.c:82
ATTN_NORM
#define ATTN_NORM
Definition: q_shared.h:995
T_Damage
void T_Damage(edict_t *targ, edict_t *inflictor, edict_t *attacker, vec3_t dir, vec3_t point, vec3_t normal, int damage, int knockback, int dflags, int mod)
Definition: g_combat.c:377
FRAME_pain101
#define FRAME_pain101
Definition: m_actor.h:98
sound_step2
static int sound_step2
Definition: m_mutant.c:42
walkmonster_start
void walkmonster_start(edict_t *self)
Definition: g_monster.c:692
MOVETYPE_STEP
@ MOVETYPE_STEP
Definition: g_local.h:196
mutant_move_idle
mmove_t mutant_move_idle
Definition: m_mutant.c:175
mutant_jump_touch
void mutant_jump_touch(edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
Definition: m_mutant.c:308
mutant_move_run
mmove_t mutant_move_run
Definition: m_mutant.c:240
SVF_DEADMONSTER
#define SVF_DEADMONSTER
Definition: game.h:28
AngleVectors
void AngleVectors(vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
Definition: q_shared.c:93
FRAME_run08
#define FRAME_run08
Definition: m_actor.h:123
sound_idle
static int sound_idle
Definition: m_mutant.c:36
mutant_jump_takeoff
void mutant_jump_takeoff(edict_t *self)
Definition: m_mutant.c:345
CHAN_VOICE
#define CHAN_VOICE
Definition: q_shared.h:985
mutant_frames_pain3
mframe_t mutant_frames_pain3[]
Definition: m_mutant.c:480
edict_s
Definition: g_local.h:968
mutant_move_pain1
mmove_t mutant_move_pain1
Definition: m_mutant.c:467
G_FreeEdict
void G_FreeEdict(edict_t *e)
Definition: g_utils.c:452
r
GLdouble GLdouble r
Definition: qgl_win.c:336
mutant_melee
void mutant_melee(edict_t *self)
Definition: m_mutant.c:298
csurface_s
Definition: q_shared.h:439
sound_step3
static int sound_step3
Definition: m_mutant.c:43
FRAME_attack08
#define FRAME_attack08
Definition: m_mutant.h:31
FRAME_pain206
#define FRAME_pain206
Definition: m_brain.h:138
game_import_t::soundindex
int(* soundindex)(char *name)
Definition: game.h:122
forward
static vec3_t forward
Definition: p_view.c:29
VectorLength
vec_t VectorLength(vec3_t v)
Definition: q_shared.c:762
AS_MISSILE
#define AS_MISSILE
Definition: g_local.h:149
mutant_idle
void mutant_idle(edict_t *self)
Definition: m_mutant.c:177
game_import_t::modelindex
int(* modelindex)(char *name)
Definition: game.h:121
sound_swing
static int sound_swing
Definition: m_mutant.c:32
mframe_t
Definition: g_local.h:403
mmove_t
Definition: g_local.h:410
mutant_move_death1
mmove_t mutant_move_death1
Definition: m_mutant.c:557
FRAME_stand151
#define FRAME_stand151
Definition: m_float.h:218
sound_hit2
static int sound_hit2
Definition: m_mutant.c:34
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
M_CheckBottom
qboolean M_CheckBottom(edict_t *ent)
Definition: m_move.c:37
VectorNormalize
vec_t VectorNormalize(vec3_t v)
Definition: q_shared.c:681
NULL
#define NULL
Definition: q_shared.h:67
FRAME_stand164
#define FRAME_stand164
Definition: m_mutant.h:149
mutant_check_refire
void mutant_check_refire(edict_t *self)
Definition: m_mutant.c:277
mutant_dead
void mutant_dead(edict_t *self)
Definition: m_mutant.c:534
mutant_hit_right
void mutant_hit_right(edict_t *self)
Definition: m_mutant.c:266
mutant_frames_start_walk
mframe_t mutant_frames_start_walk[]
Definition: m_mutant.c:212
mutant_walk
void mutant_walk(edict_t *self)
Definition: m_mutant.c:221
FRAME_pain105
#define FRAME_pain105
Definition: m_brain.h:116
sound_hit
static int sound_hit
Definition: m_mutant.c:33
skill
cvar_t * skill
Definition: g_main.c:38
FRAME_death210
#define FRAME_death210
Definition: m_actor.h:44
mutant_walk_loop
void mutant_walk_loop(edict_t *self)
Definition: m_mutant.c:207
edict_s::velocity
vec3_t velocity
Definition: g_local.h:1030
ai_move
void ai_move(edict_t *self, float dist)
Definition: g_ai.c:92
VectorCopy
#define VectorCopy(a, b)
Definition: q_shared.h:165
mutant_frames_idle
mframe_t mutant_frames_idle[]
Definition: m_mutant.c:159
RANGE_MELEE
#define RANGE_MELEE
Definition: g_local.h:119
CHAN_WEAPON
#define CHAN_WEAPON
Definition: q_shared.h:984
mutant_frames_pain2
mframe_t mutant_frames_pain2[]
Definition: m_mutant.c:469
edict_s::takedamage
int takedamage
Definition: g_local.h:1068
level
GLint level
Definition: qgl_win.c:116
ai_run
void ai_run(edict_t *self, float dist)
Definition: g_ai.c:914
FRAME_walk01
#define FRAME_walk01
Definition: m_actor.h:275
GIB_ORGANIC
#define GIB_ORGANIC
Definition: g_local.h:125
m_mutant.h
FRAME_run03
#define FRAME_run03
Definition: m_actor.h:118
FRAME_pain311
#define FRAME_pain311
Definition: m_boss31.h:121
VectorMA
void VectorMA(vec3_t veca, float scale, vec3_t vecb, vec3_t vecc)
Definition: q_shared.c:719
FRAME_attack02
#define FRAME_attack02
Definition: m_mutant.h:25
M_FlyCheck
void M_FlyCheck(edict_t *self)
Definition: g_monster.c:123
mutant_stand
void mutant_stand(edict_t *self)
Definition: m_mutant.c:143
MOD_UNKNOWN
#define MOD_UNKNOWN
Definition: g_local.h:469
mutant_frames_walk
mframe_t mutant_frames_walk[]
Definition: m_mutant.c:190
ThrowHead
void ThrowHead(edict_t *self, char *gibname, int damage, int type)
Definition: g_misc.c:183
mutant_frames_pain1
mframe_t mutant_frames_pain1[]
Definition: m_mutant.c:459
FRAME_pain201
#define FRAME_pain201
Definition: m_actor.h:101
sound_pain2
static int sound_pain2
Definition: m_mutant.c:38
MOVETYPE_TOSS
@ MOVETYPE_TOSS
Definition: g_local.h:198
VectorSet
#define VectorSet(v, x, y, z)
Definition: q_shared.h:168
mutant_checkattack
qboolean mutant_checkattack(edict_t *self)
Definition: m_mutant.c:433
mutant_move_jump
mmove_t mutant_move_jump
Definition: m_mutant.c:387
sound_pain1
static int sound_pain1
Definition: m_mutant.c:37
cplane_s
Definition: q_shared.h:413
AI_DUCKED
#define AI_DUCKED
Definition: g_local.h:140
game_import_t::linkentity
void(* linkentity)(edict_t *ent)
Definition: game.h:138
mutant_die
void mutant_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: m_mutant.c:574
mutant_frames_death1
mframe_t mutant_frames_death1[]
Definition: m_mutant.c:545
sound_death
static int sound_death
Definition: m_mutant.c:35
AS_MELEE
#define AS_MELEE
Definition: g_local.h:148
FRAME_stand152
#define FRAME_stand152
Definition: m_float.h:219
mutant_swing
void mutant_swing(edict_t *self)
Definition: m_mutant.c:72
vec3_t
vec_t vec3_t[3]
Definition: q_shared.h:134
FRAME_stand155
#define FRAME_stand155
Definition: m_insane.h:178
ai_stand
void ai_stand(edict_t *self, float dist)
Definition: g_ai.c:106
mutant_move_stand
mmove_t mutant_move_stand
Definition: m_mutant.c:141
mutant_idle_loop
void mutant_idle_loop(edict_t *self)
Definition: m_mutant.c:153
mutant_check_jump
qboolean mutant_check_jump(edict_t *self)
Definition: m_mutant.c:406
g_local.h
mutant_move_attack
mmove_t mutant_move_attack
Definition: m_mutant.c:296
mutant_frames_death2
mframe_t mutant_frames_death2[]
Definition: m_mutant.c:559