Quake II RTX doxygen  1.0 dev
m_boss2.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 boss2
22 
23 ==============================================================================
24 */
25 
26 #include "g_local.h"
27 #include "m_boss2.h"
28 
29 void BossExplode(edict_t *self);
30 
31 qboolean infront(edict_t *self, edict_t *other);
32 
33 static int sound_pain1;
34 static int sound_pain2;
35 static int sound_pain3;
36 static int sound_death;
37 static int sound_search1;
38 
39 void boss2_search(edict_t *self)
40 {
41  if (random() < 0.5)
42  gi.sound(self, CHAN_VOICE, sound_search1, 1, ATTN_NONE, 0);
43 }
44 
45 void boss2_run(edict_t *self);
46 void boss2_stand(edict_t *self);
47 void boss2_dead(edict_t *self);
48 void boss2_attack(edict_t *self);
49 void boss2_attack_mg(edict_t *self);
50 void boss2_reattack_mg(edict_t *self);
51 void boss2_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point);
52 
53 void Boss2Rocket(edict_t *self)
54 {
55  vec3_t forward, right;
56  vec3_t start;
57  vec3_t dir;
58  vec3_t vec;
59 
60  AngleVectors(self->s.angles, forward, right, NULL);
61 
62 //1
63  G_ProjectSource(self->s.origin, monster_flash_offset[MZ2_BOSS2_ROCKET_1], forward, right, start);
64  VectorCopy(self->enemy->s.origin, vec);
65  vec[2] += self->enemy->viewheight;
66  VectorSubtract(vec, start, dir);
67  VectorNormalize(dir);
68  monster_fire_rocket(self, start, dir, 50, 500, MZ2_BOSS2_ROCKET_1);
69 
70 //2
71  G_ProjectSource(self->s.origin, monster_flash_offset[MZ2_BOSS2_ROCKET_2], forward, right, start);
72  VectorCopy(self->enemy->s.origin, vec);
73  vec[2] += self->enemy->viewheight;
74  VectorSubtract(vec, start, dir);
75  VectorNormalize(dir);
76  monster_fire_rocket(self, start, dir, 50, 500, MZ2_BOSS2_ROCKET_2);
77 
78 //3
79  G_ProjectSource(self->s.origin, monster_flash_offset[MZ2_BOSS2_ROCKET_3], forward, right, start);
80  VectorCopy(self->enemy->s.origin, vec);
81  vec[2] += self->enemy->viewheight;
82  VectorSubtract(vec, start, dir);
83  VectorNormalize(dir);
84  monster_fire_rocket(self, start, dir, 50, 500, MZ2_BOSS2_ROCKET_3);
85 
86 //4
87  G_ProjectSource(self->s.origin, monster_flash_offset[MZ2_BOSS2_ROCKET_4], forward, right, start);
88  VectorCopy(self->enemy->s.origin, vec);
89  vec[2] += self->enemy->viewheight;
90  VectorSubtract(vec, start, dir);
91  VectorNormalize(dir);
92  monster_fire_rocket(self, start, dir, 50, 500, MZ2_BOSS2_ROCKET_4);
93 }
94 
95 void boss2_firebullet_right(edict_t *self)
96 {
97  vec3_t forward, right, target;
98  vec3_t start;
99 
100  AngleVectors(self->s.angles, forward, right, NULL);
101  G_ProjectSource(self->s.origin, monster_flash_offset[MZ2_BOSS2_MACHINEGUN_R1], forward, right, start);
102 
103  VectorMA(self->enemy->s.origin, -0.2, self->enemy->velocity, target);
104  target[2] += self->enemy->viewheight;
105  VectorSubtract(target, start, forward);
107 
108  monster_fire_bullet(self, start, forward, 6, 4, DEFAULT_BULLET_HSPREAD, DEFAULT_BULLET_VSPREAD, MZ2_BOSS2_MACHINEGUN_R1);
109 }
110 
111 void boss2_firebullet_left(edict_t *self)
112 {
113  vec3_t forward, right, target;
114  vec3_t start;
115 
116  AngleVectors(self->s.angles, forward, right, NULL);
117  G_ProjectSource(self->s.origin, monster_flash_offset[MZ2_BOSS2_MACHINEGUN_L1], forward, right, start);
118 
119  VectorMA(self->enemy->s.origin, -0.2, self->enemy->velocity, target);
120 
121  target[2] += self->enemy->viewheight;
122  VectorSubtract(target, start, forward);
124 
125  monster_fire_bullet(self, start, forward, 6, 4, DEFAULT_BULLET_HSPREAD, DEFAULT_BULLET_VSPREAD, MZ2_BOSS2_MACHINEGUN_L1);
126 }
127 
128 void Boss2MachineGun(edict_t *self)
129 {
130  /* vec3_t forward, right;
131  vec3_t start;
132  vec3_t dir;
133  vec3_t vec;
134  int flash_number;
135 
136  AngleVectors (self->s.angles, forward, right, NULL);
137 
138  flash_number = MZ2_BOSS2_MACHINEGUN_1 + (self->s.frame - FRAME_attack10);
139  G_ProjectSource (self->s.origin, monster_flash_offset[flash_number], forward, right, start);
140 
141  VectorCopy (self->enemy->s.origin, vec);
142  vec[2] += self->enemy->viewheight;
143  VectorSubtract (vec, start, dir);
144  VectorNormalize (dir);
145  monster_fire_bullet (self, start, dir, 3, 4, DEFAULT_BULLET_HSPREAD, DEFAULT_BULLET_VSPREAD, flash_number);
146  */
147  boss2_firebullet_left(self);
149 }
150 
151 
153  { ai_stand, 0, NULL },
154  { ai_stand, 0, NULL },
155  { ai_stand, 0, NULL },
156  { ai_stand, 0, NULL },
157  { ai_stand, 0, NULL },
158  { ai_stand, 0, NULL },
159  { ai_stand, 0, NULL },
160  { ai_stand, 0, NULL },
161  { ai_stand, 0, NULL },
162  { ai_stand, 0, NULL },
163  { ai_stand, 0, NULL },
164  { ai_stand, 0, NULL },
165  { ai_stand, 0, NULL },
166  { ai_stand, 0, NULL },
167  { ai_stand, 0, NULL },
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 
178  { ai_stand, 0, NULL },
179  { ai_stand, 0, NULL },
180  { ai_stand, 0, NULL },
181  { ai_stand, 0, NULL },
182  { ai_stand, 0, NULL },
183  { ai_stand, 0, NULL },
184  { ai_stand, 0, NULL },
185  { ai_stand, 0, NULL },
186  { ai_stand, 0, NULL },
187  { ai_stand, 0, NULL },
188  { ai_stand, 0, NULL },
189  { ai_stand, 0, NULL },
190  { ai_stand, 0, NULL },
191  { ai_stand, 0, NULL },
192  { ai_stand, 0, NULL },
193  { ai_stand, 0, NULL },
194  { ai_stand, 0, NULL },
195  { ai_stand, 0, NULL },
196  { ai_stand, 0, NULL },
197  { ai_stand, 0, NULL },
198  { ai_stand, 0, NULL },
199  { ai_stand, 0, NULL },
200  { ai_stand, 0, NULL },
201  { ai_stand, 0, NULL },
202  { ai_stand, 0, NULL },
203  { ai_stand, 0, NULL },
204  { ai_stand, 0, NULL },
205  { ai_stand, 0, NULL },
206  { ai_stand, 0, NULL },
207  { ai_stand, 0, NULL }
208 };
210 
212  { ai_walk, 8, NULL },
213  { ai_walk, 8, NULL },
214  { ai_walk, 8, NULL },
215  { ai_walk, 8, NULL },
216  { ai_walk, 8, NULL },
217  { ai_walk, 8, NULL },
218  { ai_walk, 8, NULL },
219  { ai_walk, 8, NULL },
220  { ai_walk, 8, NULL },
221  { ai_walk, 8, NULL },
222  { ai_walk, 8, NULL },
223  { ai_walk, 8, NULL },
224  { ai_walk, 8, NULL },
225  { ai_walk, 8, NULL },
226  { ai_walk, 8, NULL },
227  { ai_walk, 8, NULL },
228  { ai_walk, 8, NULL },
229  { ai_walk, 8, NULL },
230  { ai_walk, 8, NULL },
231  { ai_walk, 8, NULL }
232 };
234 
235 
237  { ai_run, 8, NULL },
238  { ai_run, 8, NULL },
239  { ai_run, 8, NULL },
240  { ai_run, 8, NULL },
241  { ai_run, 8, NULL },
242  { ai_run, 8, NULL },
243  { ai_run, 8, NULL },
244  { ai_run, 8, NULL },
245  { ai_run, 8, NULL },
246  { ai_run, 8, NULL },
247  { ai_run, 8, NULL },
248  { ai_run, 8, NULL },
249  { ai_run, 8, NULL },
250  { ai_run, 8, NULL },
251  { ai_run, 8, NULL },
252  { ai_run, 8, NULL },
253  { ai_run, 8, NULL },
254  { ai_run, 8, NULL },
255  { ai_run, 8, NULL },
256  { ai_run, 8, NULL }
257 };
259 
261  { ai_charge, 1, NULL },
262  { ai_charge, 1, NULL },
263  { ai_charge, 1, NULL },
264  { ai_charge, 1, NULL },
265  { ai_charge, 1, NULL },
266  { ai_charge, 1, NULL },
267  { ai_charge, 1, NULL },
268  { ai_charge, 1, NULL },
269  { ai_charge, 1, boss2_attack_mg }
270 };
272 
273 
274 // Loop this
276  { ai_charge, 1, Boss2MachineGun },
277  { ai_charge, 1, Boss2MachineGun },
278  { ai_charge, 1, Boss2MachineGun },
279  { ai_charge, 1, Boss2MachineGun },
280  { ai_charge, 1, Boss2MachineGun },
282 };
284 
286  { ai_charge, 1, NULL },
287  { ai_charge, 1, NULL },
288  { ai_charge, 1, NULL },
289  { ai_charge, 1, NULL }
290 };
292 
294  { ai_charge, 1, NULL },
295  { ai_charge, 1, NULL },
296  { ai_charge, 1, NULL },
297  { ai_charge, 1, NULL },
298  { ai_charge, 1, NULL },
299  { ai_charge, 1, NULL },
300  { ai_charge, 1, NULL },
301  { ai_charge, 1, NULL },
302  { ai_charge, 1, NULL },
303  { ai_charge, 1, NULL },
304  { ai_charge, 1, NULL },
305  { ai_charge, 1, NULL },
306  { ai_move, -20, Boss2Rocket },
307  { ai_charge, 1, NULL },
308  { ai_charge, 1, NULL },
309  { ai_charge, 1, NULL },
310  { ai_charge, 1, NULL },
311  { ai_charge, 1, NULL },
312  { ai_charge, 1, NULL },
313  { ai_charge, 1, NULL },
314  { ai_charge, 1, NULL }
315 };
317 
319  { ai_move, 0, NULL },
320  { ai_move, 0, NULL },
321  { ai_move, 0, NULL },
322  { ai_move, 0, NULL },
323  { ai_move, 0, NULL },
324  { ai_move, 0, NULL },
325  { ai_move, 0, NULL },
326  { ai_move, 0, NULL },
327  { ai_move, 0, NULL },
328  { ai_move, 0, NULL },
329  { ai_move, 0, NULL },
330  { ai_move, 0, NULL },
331  { ai_move, 0, NULL },
332  { ai_move, 0, NULL },
333  { ai_move, 0, NULL },
334  { ai_move, 0, NULL },
335  { ai_move, 0, NULL },
336  { ai_move, 0, NULL }
337 };
339 
341  { ai_move, 0, NULL },
342  { ai_move, 0, NULL },
343  { ai_move, 0, NULL },
344  { ai_move, 0, NULL }
345 };
347 
349  { ai_move, 0, NULL },
350  { ai_move, 0, NULL },
351  { ai_move, 0, NULL },
352  { ai_move, 0, NULL },
353  { ai_move, 0, NULL },
354  { ai_move, 0, NULL },
355  { ai_move, 0, NULL },
356  { ai_move, 0, NULL },
357  { ai_move, 0, NULL },
358  { ai_move, 0, NULL },
359  { ai_move, 0, NULL },
360  { ai_move, 0, NULL },
361  { ai_move, 0, NULL },
362  { ai_move, 0, NULL },
363  { ai_move, 0, NULL },
364  { ai_move, 0, NULL },
365  { ai_move, 0, NULL },
366  { ai_move, 0, NULL },
367  { ai_move, 0, NULL },
368  { ai_move, 0, NULL },
369  { ai_move, 0, NULL },
370  { ai_move, 0, NULL },
371  { ai_move, 0, NULL },
372  { ai_move, 0, 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  { ai_move, 0, NULL },
388  { ai_move, 0, NULL },
389  { ai_move, 0, NULL },
390  { ai_move, 0, NULL },
391  { ai_move, 0, NULL },
392  { ai_move, 0, NULL },
393  { ai_move, 0, NULL },
394  { ai_move, 0, NULL },
395  { ai_move, 0, NULL },
396  { ai_move, 0, NULL },
397  { ai_move, 0, BossExplode }
398 };
400 
401 void boss2_stand(edict_t *self)
402 {
403  self->monsterinfo.currentmove = &boss2_move_stand;
404 }
405 
406 void boss2_run(edict_t *self)
407 {
408  if (self->monsterinfo.aiflags & AI_STAND_GROUND)
409  self->monsterinfo.currentmove = &boss2_move_stand;
410  else
411  self->monsterinfo.currentmove = &boss2_move_run;
412 }
413 
414 void boss2_walk(edict_t *self)
415 {
416  self->monsterinfo.currentmove = &boss2_move_walk;
417 }
418 
419 void boss2_attack(edict_t *self)
420 {
421  vec3_t vec;
422  float range;
423 
424  VectorSubtract(self->enemy->s.origin, self->s.origin, vec);
425  range = VectorLength(vec);
426 
427  if (range <= 125) {
428  self->monsterinfo.currentmove = &boss2_move_attack_pre_mg;
429  } else {
430  if (random() <= 0.6)
431  self->monsterinfo.currentmove = &boss2_move_attack_pre_mg;
432  else
433  self->monsterinfo.currentmove = &boss2_move_attack_rocket;
434  }
435 }
436 
437 void boss2_attack_mg(edict_t *self)
438 {
439  self->monsterinfo.currentmove = &boss2_move_attack_mg;
440 }
441 
442 void boss2_reattack_mg(edict_t *self)
443 {
444  if (infront(self, self->enemy))
445  if (random() <= 0.7)
446  self->monsterinfo.currentmove = &boss2_move_attack_mg;
447  else
448  self->monsterinfo.currentmove = &boss2_move_attack_post_mg;
449  else
450  self->monsterinfo.currentmove = &boss2_move_attack_post_mg;
451 }
452 
453 
454 void boss2_pain(edict_t *self, edict_t *other, float kick, int damage)
455 {
456  if (self->health < (self->max_health / 2))
457  self->s.skinnum = 1;
458 
459  if (level.time < self->pain_debounce_time)
460  return;
461 
462  self->pain_debounce_time = level.time + 3;
463 // American wanted these at no attenuation
464  if (damage < 10) {
465  gi.sound(self, CHAN_VOICE, sound_pain3, 1, ATTN_NONE, 0);
466  self->monsterinfo.currentmove = &boss2_move_pain_light;
467  } else if (damage < 30) {
468  gi.sound(self, CHAN_VOICE, sound_pain1, 1, ATTN_NONE, 0);
469  self->monsterinfo.currentmove = &boss2_move_pain_light;
470  } else {
471  gi.sound(self, CHAN_VOICE, sound_pain2, 1, ATTN_NONE, 0);
472  self->monsterinfo.currentmove = &boss2_move_pain_heavy;
473  }
474 }
475 
476 void boss2_dead(edict_t *self)
477 {
478  VectorSet(self->mins, -56, -56, 0);
479  VectorSet(self->maxs, 56, 56, 80);
480  self->movetype = MOVETYPE_TOSS;
481  self->svflags |= SVF_DEADMONSTER;
482  self->nextthink = 0;
483  gi.linkentity(self);
484 }
485 
486 void boss2_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
487 {
488  gi.sound(self, CHAN_VOICE, sound_death, 1, ATTN_NONE, 0);
489  self->deadflag = DEAD_DEAD;
490  self->takedamage = DAMAGE_NO;
491  self->count = 0;
492  self->monsterinfo.currentmove = &boss2_move_death;
493 #if 0
494  int n;
495 
496  self->s.sound = 0;
497  // check for gib
498  if (self->health <= self->gib_health) {
499  gi.sound(self, CHAN_VOICE, gi.soundindex("misc/udeath.wav"), 1, ATTN_NORM, 0);
500  for (n = 0; n < 2; n++)
501  ThrowGib(self, "models/objects/gibs/bone/tris.md2", damage, GIB_ORGANIC);
502  for (n = 0; n < 4; n++)
503  ThrowGib(self, "models/objects/gibs/sm_meat/tris.md2", damage, GIB_ORGANIC);
504  ThrowHead(self, "models/objects/gibs/head2/tris.md2", damage, GIB_ORGANIC);
505  self->deadflag = DEAD_DEAD;
506  return;
507  }
508 
509  if (self->deadflag == DEAD_DEAD)
510  return;
511 
512  self->deadflag = DEAD_DEAD;
513  self->takedamage = DAMAGE_YES;
514  self->monsterinfo.currentmove = &boss2_move_death;
515 #endif
516 }
517 
518 qboolean Boss2_CheckAttack(edict_t *self)
519 {
520  vec3_t spot1, spot2;
521  vec3_t temp;
522  float chance;
523  trace_t tr;
524  int enemy_range;
525  float enemy_yaw;
526 
527  if (self->enemy->health > 0) {
528  // see if any entities are in the way of the shot
529  VectorCopy(self->s.origin, spot1);
530  spot1[2] += self->viewheight;
531  VectorCopy(self->enemy->s.origin, spot2);
532  spot2[2] += self->enemy->viewheight;
533 
534  tr = gi.trace(spot1, NULL, NULL, spot2, self, CONTENTS_SOLID | CONTENTS_MONSTER | CONTENTS_SLIME | CONTENTS_LAVA);
535 
536  // do we have a clear shot?
537  if (tr.ent != self->enemy)
538  return qfalse;
539  }
540 
541  enemy_range = range(self, self->enemy);
542  VectorSubtract(self->enemy->s.origin, self->s.origin, temp);
543  enemy_yaw = vectoyaw(temp);
544 
545  self->ideal_yaw = enemy_yaw;
546 
547 
548  // melee attack
549  if (enemy_range == RANGE_MELEE) {
550  if (self->monsterinfo.melee)
551  self->monsterinfo.attack_state = AS_MELEE;
552  else
553  self->monsterinfo.attack_state = AS_MISSILE;
554  return qtrue;
555  }
556 
557 // missile attack
558  if (!self->monsterinfo.attack)
559  return qfalse;
560 
561  if (level.time < self->monsterinfo.attack_finished)
562  return qfalse;
563 
564  if (enemy_range == RANGE_FAR)
565  return qfalse;
566 
567  if (self->monsterinfo.aiflags & AI_STAND_GROUND) {
568  chance = 0.4;
569  } else if (enemy_range == RANGE_MELEE) {
570  chance = 0.8;
571  } else if (enemy_range == RANGE_NEAR) {
572  chance = 0.8;
573  } else if (enemy_range == RANGE_MID) {
574  chance = 0.8;
575  } else {
576  return qfalse;
577  }
578 
579  if (random() < chance) {
580  self->monsterinfo.attack_state = AS_MISSILE;
581  self->monsterinfo.attack_finished = level.time + 2 * random();
582  return qtrue;
583  }
584 
585  if (self->flags & FL_FLY) {
586  if (random() < 0.3)
587  self->monsterinfo.attack_state = AS_SLIDING;
588  else
589  self->monsterinfo.attack_state = AS_STRAIGHT;
590  }
591 
592  return qfalse;
593 }
594 
595 
596 
597 /*QUAKED monster_boss2 (1 .5 0) (-56 -56 0) (56 56 80) Ambush Trigger_Spawn Sight
598 */
599 void SP_monster_boss2(edict_t *self)
600 {
601  if (deathmatch->value) {
602  G_FreeEdict(self);
603  return;
604  }
605 
606  sound_pain1 = gi.soundindex("bosshovr/bhvpain1.wav");
607  sound_pain2 = gi.soundindex("bosshovr/bhvpain2.wav");
608  sound_pain3 = gi.soundindex("bosshovr/bhvpain3.wav");
609  sound_death = gi.soundindex("bosshovr/bhvdeth1.wav");
610  sound_search1 = gi.soundindex("bosshovr/bhvunqv1.wav");
611 
612  self->s.sound = gi.soundindex("bosshovr/bhvengn1.wav");
613 
614  self->movetype = MOVETYPE_STEP;
615  self->solid = SOLID_BBOX;
616  self->s.modelindex = gi.modelindex("models/monsters/boss2/tris.md2");
617  VectorSet(self->mins, -56, -56, 0);
618  VectorSet(self->maxs, 56, 56, 80);
619 
620  self->health = 2000;
621  self->gib_health = -200;
622  self->mass = 1000;
623 
624  self->flags |= FL_IMMUNE_LASER;
625 
626  self->pain = boss2_pain;
627  self->die = boss2_die;
628 
629  self->monsterinfo.stand = boss2_stand;
630  self->monsterinfo.walk = boss2_walk;
631  self->monsterinfo.run = boss2_run;
632  self->monsterinfo.attack = boss2_attack;
633  self->monsterinfo.search = boss2_search;
634  self->monsterinfo.checkattack = Boss2_CheckAttack;
635  gi.linkentity(self);
636 
637  self->monsterinfo.currentmove = &boss2_move_stand;
638  self->monsterinfo.scale = MODEL_SCALE;
639 
640  flymonster_start(self);
641 }
gi
game_import_t gi
Definition: g_main.c:23
boss2_frames_walk
mframe_t boss2_frames_walk[]
Definition: m_boss2.c:211
m_boss2.h
RANGE_NEAR
#define RANGE_NEAR
Definition: g_local.h:117
deathmatch
cvar_t * deathmatch
Definition: g_main.c:33
G_ProjectSource
void G_ProjectSource(const vec3_t point, const vec3_t distance, const vec3_t forward, const vec3_t right, vec3_t result)
Definition: g_utils.c:23
DEAD_DEAD
#define DEAD_DEAD
Definition: g_local.h:112
DEFAULT_BULLET_HSPREAD
#define DEFAULT_BULLET_HSPREAD
Definition: g_local.h:654
boss2_firebullet_left
void boss2_firebullet_left(edict_t *self)
Definition: m_boss2.c:111
ThrowGib
void ThrowGib(edict_t *self, char *gibname, int damage, int type)
Definition: g_misc.c:130
boss2_move_attack_pre_mg
mmove_t boss2_move_attack_pre_mg
Definition: m_boss2.c:271
FRAME_attack1
#define FRAME_attack1
Definition: m_boss2.h:92
ai_charge
void ai_charge(edict_t *self, float dist)
Definition: g_ai.c:175
boss2_frames_attack_post_mg
mframe_t boss2_frames_attack_post_mg[]
Definition: m_boss2.c:285
FRAME_attack15
#define FRAME_attack15
Definition: m_boss2.h:106
SP_monster_boss2
void SP_monster_boss2(edict_t *self)
Definition: m_boss2.c:599
boss2_reattack_mg
void boss2_reattack_mg(edict_t *self)
Definition: m_boss2.c:442
boss2_move_attack_mg
mmove_t boss2_move_attack_mg
Definition: m_boss2.c:283
boss2_frames_attack_mg
mframe_t boss2_frames_attack_mg[]
Definition: m_boss2.c:275
boss2_firebullet_right
void boss2_firebullet_right(edict_t *self)
Definition: m_boss2.c:95
boss2_pain
void boss2_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: m_boss2.c:454
AI_STAND_GROUND
#define AI_STAND_GROUND
Definition: g_local.h:126
MODEL_SCALE
#define MODEL_SCALE
Definition: m_actor.h:504
BossExplode
void BossExplode(edict_t *self)
Definition: m_supertank.c:569
DAMAGE_YES
@ DAMAGE_YES
Definition: g_local.h:88
infront
qboolean infront(edict_t *self, edict_t *other)
Definition: g_ai.c:293
vectoyaw
float vectoyaw(vec3_t vec)
Definition: g_utils.c:310
sound_death
static int sound_death
Definition: m_boss2.c:36
other
@ other
Definition: ogg.c:63
MOVETYPE_STEP
@ MOVETYPE_STEP
Definition: g_local.h:192
boss2_move_attack_post_mg
mmove_t boss2_move_attack_post_mg
Definition: m_boss2.c:291
FRAME_pain19
#define FRAME_pain19
Definition: m_boss2.h:149
boss2_frames_run
mframe_t boss2_frames_run[]
Definition: m_boss2.c:236
sound_pain2
static int sound_pain2
Definition: m_boss2.c:34
boss2_frames_attack_rocket
mframe_t boss2_frames_attack_rocket[]
Definition: m_boss2.c:293
boss2_stand
void boss2_stand(edict_t *self)
Definition: m_boss2.c:401
boss2_frames_pain_heavy
mframe_t boss2_frames_pain_heavy[]
Definition: m_boss2.c:318
DEFAULT_BULLET_VSPREAD
#define DEFAULT_BULLET_VSPREAD
Definition: g_local.h:655
G_FreeEdict
void G_FreeEdict(edict_t *e)
Definition: g_utils.c:421
boss2_frames_attack_pre_mg
mframe_t boss2_frames_attack_pre_mg[]
Definition: m_boss2.c:260
FRAME_stand30
#define FRAME_stand30
Definition: m_boss2.h:22
AS_SLIDING
#define AS_SLIDING
Definition: g_local.h:144
boss2_frames_fidget
mframe_t boss2_frames_fidget[]
Definition: m_boss2.c:177
FRAME_pain23
#define FRAME_pain23
Definition: m_boss2.h:153
forward
static vec3_t forward
Definition: p_view.c:27
boss2_walk
void boss2_walk(edict_t *self)
Definition: m_boss2.c:414
AS_MISSILE
#define AS_MISSILE
Definition: g_local.h:146
boss2_attack_mg
void boss2_attack_mg(edict_t *self)
Definition: m_boss2.c:437
mframe_t
Definition: g_local.h:394
FRAME_attack19
#define FRAME_attack19
Definition: m_boss2.h:110
mmove_t
Definition: g_local.h:400
boss2_move_fidget
mmove_t boss2_move_fidget
Definition: m_boss2.c:209
FRAME_pain2
#define FRAME_pain2
Definition: m_boss2.h:132
ai_walk
void ai_walk(edict_t *self, float dist)
Definition: g_ai.c:148
FRAME_attack9
#define FRAME_attack9
Definition: m_boss2.h:100
random
#define random()
Definition: g_local.h:504
boss2_move_death
mmove_t boss2_move_death
Definition: m_boss2.c:399
AngleVectors
void AngleVectors(vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
Definition: shared.c:23
DAMAGE_NO
@ DAMAGE_NO
Definition: g_local.h:87
FRAME_stand1
#define FRAME_stand1
Definition: m_berserk.h:22
boss2_move_walk
mmove_t boss2_move_walk
Definition: m_boss2.c:233
FRAME_stand50
#define FRAME_stand50
Definition: m_boss2.h:42
boss2_frames_pain_light
mframe_t boss2_frames_pain_light[]
Definition: m_boss2.c:340
boss2_run
void boss2_run(edict_t *self)
Definition: m_boss2.c:406
FRAME_attack40
#define FRAME_attack40
Definition: m_boss2.h:131
FRAME_walk20
#define FRAME_walk20
Definition: m_boss2.h:91
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:29
FRAME_attack20
#define FRAME_attack20
Definition: m_boss2.h:111
monster_fire_rocket
void monster_fire_rocket(edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, int flashtype)
Definition: g_monster.c:69
boss2_move_attack_rocket
mmove_t boss2_move_attack_rocket
Definition: m_boss2.c:316
ai_move
void ai_move(edict_t *self, float dist)
Definition: g_ai.c:86
level_locals_t::time
float time
Definition: g_local.h:299
FRAME_attack16
#define FRAME_attack16
Definition: m_boss2.h:107
FRAME_walk1
#define FRAME_walk1
Definition: m_boss2.h:72
RANGE_MELEE
#define RANGE_MELEE
Definition: g_local.h:116
FL_IMMUNE_LASER
#define FL_IMMUNE_LASER
Definition: g_local.h:61
Boss2Rocket
void Boss2Rocket(edict_t *self)
Definition: m_boss2.c:53
boss2_move_run
mmove_t boss2_move_run
Definition: m_boss2.c:258
right
static vec3_t right
Definition: p_view.c:27
ai_run
void ai_run(edict_t *self, float dist)
Definition: g_ai.c:821
boss2_dead
void boss2_dead(edict_t *self)
Definition: m_boss2.c:476
enemy_range
int enemy_range
Definition: g_ai.c:28
boss2_frames_stand
mframe_t boss2_frames_stand[]
Definition: m_boss2.c:152
GIB_ORGANIC
#define GIB_ORGANIC
Definition: g_local.h:122
level
level_locals_t level
Definition: g_main.c:22
RANGE_MID
#define RANGE_MID
Definition: g_local.h:118
Boss2_CheckAttack
qboolean Boss2_CheckAttack(edict_t *self)
Definition: m_boss2.c:518
sound_search1
static int sound_search1
Definition: m_boss2.c:37
boss2_frames_death
mframe_t boss2_frames_death[]
Definition: m_boss2.c:348
FL_FLY
#define FL_FLY
Definition: g_local.h:59
monster_flash_offset
const vec3_t monster_flash_offset[256]
Definition: m_flash.c:25
boss2_attack
void boss2_attack(edict_t *self)
Definition: m_boss2.c:419
ThrowHead
void ThrowHead(edict_t *self, char *gibname, int damage, int type)
Definition: g_misc.c:175
boss2_move_pain_heavy
mmove_t boss2_move_pain_heavy
Definition: m_boss2.c:338
boss2_move_pain_light
mmove_t boss2_move_pain_light
Definition: m_boss2.c:346
boss2_move_stand
mmove_t boss2_move_stand
Definition: m_boss2.c:175
MOVETYPE_TOSS
@ MOVETYPE_TOSS
Definition: g_local.h:194
range
int range(edict_t *self, edict_t *other)
Definition: g_ai.c:245
boss2_search
void boss2_search(edict_t *self)
Definition: m_boss2.c:39
boss2_die
void boss2_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: m_boss2.c:486
sound_pain3
static int sound_pain3
Definition: m_boss2.c:35
FRAME_death2
#define FRAME_death2
Definition: m_berserk.h:246
AS_MELEE
#define AS_MELEE
Definition: g_local.h:145
RANGE_FAR
#define RANGE_FAR
Definition: g_local.h:119
FRAME_death50
#define FRAME_death50
Definition: m_boss2.h:202
enemy_yaw
float enemy_yaw
Definition: g_ai.c:29
VectorNormalize
vec_t VectorNormalize(vec3_t v)
Definition: shared.c:55
Boss2MachineGun
void Boss2MachineGun(edict_t *self)
Definition: m_boss2.c:128
ai_stand
void ai_stand(edict_t *self, float dist)
Definition: g_ai.c:100
FRAME_pain20
#define FRAME_pain20
Definition: m_boss2.h:150
sound_pain1
static int sound_pain1
Definition: m_boss2.c:33
g_local.h
AS_STRAIGHT
#define AS_STRAIGHT
Definition: g_local.h:143
flymonster_start
void flymonster_start(edict_t *self)
Definition: g_monster.c:653
FRAME_attack10
#define FRAME_attack10
Definition: m_boss2.h:101