icculus quake2 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
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 boss2
24 
25 ==============================================================================
26 */
27 
28 #include "g_local.h"
29 #include "m_boss2.h"
30 
31 void BossExplode (edict_t *self);
32 
33 qboolean infront (edict_t *self, edict_t *other);
34 
35 static int sound_pain1;
36 static int sound_pain2;
37 static int sound_pain3;
38 static int sound_death;
39 static int sound_search1;
40 
41 void boss2_search (edict_t *self)
42 {
43  if (random() < 0.5)
44  gi.sound (self, CHAN_VOICE, sound_search1, 1, ATTN_NONE, 0);
45 }
46 
47 void boss2_run (edict_t *self);
48 void boss2_stand (edict_t *self);
49 void boss2_dead (edict_t *self);
50 void boss2_attack (edict_t *self);
51 void boss2_attack_mg (edict_t *self);
52 void boss2_reattack_mg (edict_t *self);
53 void boss2_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point);
54 
55 void Boss2Rocket (edict_t *self)
56 {
58  vec3_t start;
59  vec3_t dir;
60  vec3_t vec;
61 
62  AngleVectors (self->s.angles, forward, right, NULL);
63 
64 //1
66  VectorCopy (self->enemy->s.origin, vec);
67  vec[2] += self->enemy->viewheight;
68  VectorSubtract (vec, start, dir);
69  VectorNormalize (dir);
70  monster_fire_rocket (self, start, dir, 50, 500, MZ2_BOSS2_ROCKET_1);
71 
72 //2
74  VectorCopy (self->enemy->s.origin, vec);
75  vec[2] += self->enemy->viewheight;
76  VectorSubtract (vec, start, dir);
77  VectorNormalize (dir);
78  monster_fire_rocket (self, start, dir, 50, 500, MZ2_BOSS2_ROCKET_2);
79 
80 //3
82  VectorCopy (self->enemy->s.origin, vec);
83  vec[2] += self->enemy->viewheight;
84  VectorSubtract (vec, start, dir);
85  VectorNormalize (dir);
86  monster_fire_rocket (self, start, dir, 50, 500, MZ2_BOSS2_ROCKET_3);
87 
88 //4
90  VectorCopy (self->enemy->s.origin, vec);
91  vec[2] += self->enemy->viewheight;
92  VectorSubtract (vec, start, dir);
93  VectorNormalize (dir);
94  monster_fire_rocket (self, start, dir, 50, 500, MZ2_BOSS2_ROCKET_4);
95 }
96 
98 {
100  vec3_t start;
101 
102  AngleVectors (self->s.angles, forward, right, NULL);
104 
105  VectorMA (self->enemy->s.origin, -0.2, self->enemy->velocity, target);
106  target[2] += self->enemy->viewheight;
107  VectorSubtract (target, start, forward);
109 
111 }
112 
114 {
116  vec3_t start;
117 
118  AngleVectors (self->s.angles, forward, right, NULL);
120 
121  VectorMA (self->enemy->s.origin, -0.2, self->enemy->velocity, target);
122 
123  target[2] += self->enemy->viewheight;
124  VectorSubtract (target, start, forward);
126 
128 }
129 
131 {
132 /* vec3_t forward, right;
133  vec3_t start;
134  vec3_t dir;
135  vec3_t vec;
136  int flash_number;
137 
138  AngleVectors (self->s.angles, forward, right, NULL);
139 
140  flash_number = MZ2_BOSS2_MACHINEGUN_1 + (self->s.frame - FRAME_attack10);
141  G_ProjectSource (self->s.origin, monster_flash_offset[flash_number], forward, right, start);
142 
143  VectorCopy (self->enemy->s.origin, vec);
144  vec[2] += self->enemy->viewheight;
145  VectorSubtract (vec, start, dir);
146  VectorNormalize (dir);
147  monster_fire_bullet (self, start, dir, 3, 4, DEFAULT_BULLET_HSPREAD, DEFAULT_BULLET_VSPREAD, flash_number);
148 */
149  boss2_firebullet_left(self);
151 }
152 
153 
155 {
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  {ai_stand, 0, NULL},
175  {ai_stand, 0, NULL},
176  {ai_stand, 0, NULL}
177 };
179 
181 {
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  {ai_stand, 0, NULL},
209  {ai_stand, 0, NULL},
210  {ai_stand, 0, NULL},
211  {ai_stand, 0, NULL}
212 };
214 
216 {
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  {ai_walk, 8, NULL},
233  {ai_walk, 8, NULL},
234  {ai_walk, 8, NULL},
235  {ai_walk, 8, NULL},
236  {ai_walk, 8, NULL}
237 };
239 
240 
242 {
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  {ai_run, 8, NULL},
258  {ai_run, 8, NULL},
259  {ai_run, 8, NULL},
260  {ai_run, 8, NULL},
261  {ai_run, 8, NULL},
262  {ai_run, 8, NULL}
263 };
265 
267 {
268  {ai_charge, 1, NULL},
269  {ai_charge, 1, NULL},
270  {ai_charge, 1, NULL},
271  {ai_charge, 1, NULL},
272  {ai_charge, 1, NULL},
273  {ai_charge, 1, NULL},
274  {ai_charge, 1, NULL},
275  {ai_charge, 1, NULL},
277 };
279 
280 
281 // Loop this
283 {
290 };
292 
294 {
295  {ai_charge, 1, NULL},
296  {ai_charge, 1, NULL},
297  {ai_charge, 1, NULL},
298  {ai_charge, 1, NULL}
299 };
301 
303 {
304  {ai_charge, 1, NULL},
305  {ai_charge, 1, NULL},
306  {ai_charge, 1, NULL},
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  {ai_charge, 1, NULL},
316  {ai_move, -20, Boss2Rocket},
317  {ai_charge, 1, NULL},
318  {ai_charge, 1, NULL},
319  {ai_charge, 1, NULL},
320  {ai_charge, 1, NULL},
321  {ai_charge, 1, NULL},
322  {ai_charge, 1, NULL},
323  {ai_charge, 1, NULL},
324  {ai_charge, 1, NULL}
325 };
327 
329 {
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  {ai_move, 0, NULL},
338  {ai_move, 0, NULL},
339  {ai_move, 0, NULL},
340  {ai_move, 0, NULL},
341  {ai_move, 0, NULL},
342  {ai_move, 0, NULL},
343  {ai_move, 0, NULL},
344  {ai_move, 0, NULL},
345  {ai_move, 0, NULL},
346  {ai_move, 0, NULL},
347  {ai_move, 0, NULL}
348 };
350 
352 {
353  {ai_move, 0, NULL},
354  {ai_move, 0, NULL},
355  {ai_move, 0, NULL},
356  {ai_move, 0, NULL}
357 };
359 
361 {
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, NULL},
398  {ai_move, 0, NULL},
399  {ai_move, 0, NULL},
400  {ai_move, 0, NULL},
401  {ai_move, 0, NULL},
402  {ai_move, 0, NULL},
403  {ai_move, 0, NULL},
404  {ai_move, 0, NULL},
405  {ai_move, 0, NULL},
406  {ai_move, 0, NULL},
407  {ai_move, 0, NULL},
408  {ai_move, 0, NULL},
409  {ai_move, 0, NULL},
410  {ai_move, 0, BossExplode}
411 };
413 
414 void boss2_stand (edict_t *self)
415 {
416  self->monsterinfo.currentmove = &boss2_move_stand;
417 }
418 
419 void boss2_run (edict_t *self)
420 {
421  if (self->monsterinfo.aiflags & AI_STAND_GROUND)
422  self->monsterinfo.currentmove = &boss2_move_stand;
423  else
424  self->monsterinfo.currentmove = &boss2_move_run;
425 }
426 
427 void boss2_walk (edict_t *self)
428 {
429  self->monsterinfo.currentmove = &boss2_move_walk;
430 }
431 
432 void boss2_attack (edict_t *self)
433 {
434  vec3_t vec;
435  float range;
436 
437  VectorSubtract (self->enemy->s.origin, self->s.origin, vec);
438  range = VectorLength (vec);
439 
440  if (range <= 125)
441  {
442  self->monsterinfo.currentmove = &boss2_move_attack_pre_mg;
443  }
444  else
445  {
446  if (random() <= 0.6)
447  self->monsterinfo.currentmove = &boss2_move_attack_pre_mg;
448  else
449  self->monsterinfo.currentmove = &boss2_move_attack_rocket;
450  }
451 }
452 
454 {
455  self->monsterinfo.currentmove = &boss2_move_attack_mg;
456 }
457 
459 {
460  if ( infront(self, self->enemy) )
461  if (random() <= 0.7)
462  self->monsterinfo.currentmove = &boss2_move_attack_mg;
463  else
464  self->monsterinfo.currentmove = &boss2_move_attack_post_mg;
465  else
466  self->monsterinfo.currentmove = &boss2_move_attack_post_mg;
467 }
468 
469 
470 void boss2_pain (edict_t *self, edict_t *other, float kick, int damage)
471 {
472  if (self->health < (self->max_health / 2))
473  self->s.skinnum = 1;
474 
475  if (level.time < self->pain_debounce_time)
476  return;
477 
478  self->pain_debounce_time = level.time + 3;
479 // American wanted these at no attenuation
480  if (damage < 10)
481  {
482  gi.sound (self, CHAN_VOICE, sound_pain3, 1, ATTN_NONE, 0);
483  self->monsterinfo.currentmove = &boss2_move_pain_light;
484  }
485  else if (damage < 30)
486  {
487  gi.sound (self, CHAN_VOICE, sound_pain1, 1, ATTN_NONE, 0);
488  self->monsterinfo.currentmove = &boss2_move_pain_light;
489  }
490  else
491  {
492  gi.sound (self, CHAN_VOICE, sound_pain2, 1, ATTN_NONE, 0);
493  self->monsterinfo.currentmove = &boss2_move_pain_heavy;
494  }
495 }
496 
497 void boss2_dead (edict_t *self)
498 {
499  VectorSet (self->mins, -56, -56, 0);
500  VectorSet (self->maxs, 56, 56, 80);
501  self->movetype = MOVETYPE_TOSS;
502  self->svflags |= SVF_DEADMONSTER;
503  self->nextthink = 0;
504  gi.linkentity (self);
505 }
506 
507 void boss2_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
508 {
509  gi.sound (self, CHAN_VOICE, sound_death, 1, ATTN_NONE, 0);
510  self->deadflag = DEAD_DEAD;
511  self->takedamage = DAMAGE_NO;
512  self->count = 0;
513  self->monsterinfo.currentmove = &boss2_move_death;
514 #if 0
515  int n;
516 
517  self->s.sound = 0;
518  // check for gib
519  if (self->health <= self->gib_health)
520  {
521  gi.sound (self, CHAN_VOICE, gi.soundindex ("misc/udeath.wav"), 1, ATTN_NORM, 0);
522  for (n= 0; n < 2; n++)
523  ThrowGib (self, "models/objects/gibs/bone/tris.md2", damage, GIB_ORGANIC);
524  for (n= 0; n < 4; n++)
525  ThrowGib (self, "models/objects/gibs/sm_meat/tris.md2", damage, GIB_ORGANIC);
526  ThrowHead (self, "models/objects/gibs/head2/tris.md2", damage, GIB_ORGANIC);
527  self->deadflag = DEAD_DEAD;
528  return;
529  }
530 
531  if (self->deadflag == DEAD_DEAD)
532  return;
533 
534  self->deadflag = DEAD_DEAD;
535  self->takedamage = DAMAGE_YES;
536  self->monsterinfo.currentmove = &boss2_move_death;
537 #endif
538 }
539 
541 {
542  vec3_t spot1, spot2;
543  vec3_t temp;
544  float chance;
545  trace_t tr;
547  int enemy_range;
548  float enemy_yaw;
549 
550  if (self->enemy->health > 0)
551  {
552  // see if any entities are in the way of the shot
553  VectorCopy (self->s.origin, spot1);
554  spot1[2] += self->viewheight;
555  VectorCopy (self->enemy->s.origin, spot2);
556  spot2[2] += self->enemy->viewheight;
557 
559 
560  // do we have a clear shot?
561  if (tr.ent != self->enemy)
562  return false;
563  }
564 
565  enemy_infront = infront(self, self->enemy);
566  enemy_range = range(self, self->enemy);
567  VectorSubtract (self->enemy->s.origin, self->s.origin, temp);
568  enemy_yaw = vectoyaw(temp);
569 
570  self->ideal_yaw = enemy_yaw;
571 
572 
573  // melee attack
574  if (enemy_range == RANGE_MELEE)
575  {
576  if (self->monsterinfo.melee)
577  self->monsterinfo.attack_state = AS_MELEE;
578  else
579  self->monsterinfo.attack_state = AS_MISSILE;
580  return true;
581  }
582 
583 // missile attack
584  if (!self->monsterinfo.attack)
585  return false;
586 
587  if (level.time < self->monsterinfo.attack_finished)
588  return false;
589 
590  if (enemy_range == RANGE_FAR)
591  return false;
592 
593  if (self->monsterinfo.aiflags & AI_STAND_GROUND)
594  {
595  chance = 0.4;
596  }
597  else if (enemy_range == RANGE_MELEE)
598  {
599  chance = 0.8;
600  }
601  else if (enemy_range == RANGE_NEAR)
602  {
603  chance = 0.8;
604  }
605  else if (enemy_range == RANGE_MID)
606  {
607  chance = 0.8;
608  }
609  else
610  {
611  return false;
612  }
613 
614  if (random () < chance)
615  {
616  self->monsterinfo.attack_state = AS_MISSILE;
617  self->monsterinfo.attack_finished = level.time + 2*random();
618  return true;
619  }
620 
621  if (self->flags & FL_FLY)
622  {
623  if (random() < 0.3)
624  self->monsterinfo.attack_state = AS_SLIDING;
625  else
626  self->monsterinfo.attack_state = AS_STRAIGHT;
627  }
628 
629  return false;
630 }
631 
632 
633 
634 /*QUAKED monster_boss2 (1 .5 0) (-56 -56 0) (56 56 80) Ambush Trigger_Spawn Sight
635 */
637 {
638  if (deathmatch->value)
639  {
640  G_FreeEdict (self);
641  return;
642  }
643 
644  sound_pain1 = gi.soundindex ("bosshovr/bhvpain1.wav");
645  sound_pain2 = gi.soundindex ("bosshovr/bhvpain2.wav");
646  sound_pain3 = gi.soundindex ("bosshovr/bhvpain3.wav");
647  sound_death = gi.soundindex ("bosshovr/bhvdeth1.wav");
648  sound_search1 = gi.soundindex ("bosshovr/bhvunqv1.wav");
649 
650  self->s.sound = gi.soundindex ("bosshovr/bhvengn1.wav");
651 
652  self->movetype = MOVETYPE_STEP;
653  self->solid = SOLID_BBOX;
654  self->s.modelindex = gi.modelindex ("models/monsters/boss2/tris.md2");
655  VectorSet (self->mins, -56, -56, 0);
656  VectorSet (self->maxs, 56, 56, 80);
657 
658  self->health = 2000;
659  self->gib_health = -200;
660  self->mass = 1000;
661 
662  self->flags |= FL_IMMUNE_LASER;
663 
664  self->pain = boss2_pain;
665  self->die = boss2_die;
666 
667  self->monsterinfo.stand = boss2_stand;
668  self->monsterinfo.walk = boss2_walk;
669  self->monsterinfo.run = boss2_run;
670  self->monsterinfo.attack = boss2_attack;
671  self->monsterinfo.search = boss2_search;
672  self->monsterinfo.checkattack = Boss2_CheckAttack;
673  gi.linkentity (self);
674 
675  self->monsterinfo.currentmove = &boss2_move_stand;
676  self->monsterinfo.scale = MODEL_SCALE;
677 
678  flymonster_start (self);
679 }
gi
game_import_t gi
Definition: g_main.c:25
boss2_frames_walk
mframe_t boss2_frames_walk[]
Definition: m_boss2.c:215
G_ProjectSource
void G_ProjectSource(vec3_t point, vec3_t distance, vec3_t forward, vec3_t right, vec3_t result)
Definition: g_utils.c:25
m_boss2.h
RANGE_NEAR
#define RANGE_NEAR
Definition: g_local.h:118
deathmatch
cvar_t * deathmatch
Definition: g_main.c:35
CONTENTS_MONSTER
#define CONTENTS_MONSTER
Definition: qfiles.h:359
DEAD_DEAD
#define DEAD_DEAD
Definition: g_local.h:113
MZ2_BOSS2_ROCKET_1
#define MZ2_BOSS2_ROCKET_1
Definition: q_shared.h:782
game_import_t::trace
trace_t(* trace)(vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, edict_t *passent, int contentmask)
Definition: game.h:128
DEFAULT_BULLET_HSPREAD
#define DEFAULT_BULLET_HSPREAD
Definition: g_local.h:664
boss2_firebullet_left
void boss2_firebullet_left(edict_t *self)
Definition: m_boss2.c:113
ThrowGib
void ThrowGib(edict_t *self, char *gibname, int damage, int type)
Definition: g_misc.c:135
VectorSubtract
#define VectorSubtract(a, b, c)
Definition: q_shared.h:156
boss2_move_attack_pre_mg
mmove_t boss2_move_attack_pre_mg
Definition: m_boss2.c:278
FRAME_attack1
#define FRAME_attack1
Definition: m_boss2.h:94
ai_charge
void ai_charge(edict_t *self, float dist)
Definition: g_ai.c:194
boss2_frames_attack_post_mg
mframe_t boss2_frames_attack_post_mg[]
Definition: m_boss2.c:293
SOLID_BBOX
@ SOLID_BBOX
Definition: game.h:37
FRAME_attack15
#define FRAME_attack15
Definition: m_boss2.h:108
SP_monster_boss2
void SP_monster_boss2(edict_t *self)
Definition: m_boss2.c:636
MZ2_BOSS2_MACHINEGUN_R1
#define MZ2_BOSS2_MACHINEGUN_R1
Definition: q_shared.h:841
boss2_reattack_mg
void boss2_reattack_mg(edict_t *self)
Definition: m_boss2.c:458
boss2_move_attack_mg
mmove_t boss2_move_attack_mg
Definition: m_boss2.c:291
MZ2_BOSS2_ROCKET_3
#define MZ2_BOSS2_ROCKET_3
Definition: q_shared.h:784
boss2_frames_attack_mg
mframe_t boss2_frames_attack_mg[]
Definition: m_boss2.c:282
boss2_firebullet_right
void boss2_firebullet_right(edict_t *self)
Definition: m_boss2.c:97
boss2_pain
void boss2_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: m_boss2.c:470
AI_STAND_GROUND
#define AI_STAND_GROUND
Definition: g_local.h:127
qboolean
qboolean
Definition: q_shared.h:56
trace_t
Definition: q_shared.h:449
MODEL_SCALE
#define MODEL_SCALE
Definition: m_actor.h:506
BossExplode
void BossExplode(edict_t *self)
Definition: m_supertank.c:594
DAMAGE_YES
@ DAMAGE_YES
Definition: g_local.h:87
game_import_t::sound
void(* sound)(edict_t *ent, int channel, int soundindex, float volume, float attenuation, float timeofs)
Definition: game.h:109
infront
qboolean infront(edict_t *self, edict_t *other)
Definition: g_ai.c:312
vectoyaw
float vectoyaw(vec3_t vec)
Definition: g_utils.c:333
CONTENTS_SOLID
#define CONTENTS_SOLID
Definition: qfiles.h:333
range
GLsizei range
Definition: qgl_win.c:121
sound_death
static int sound_death
Definition: m_boss2.c:38
ATTN_NORM
#define ATTN_NORM
Definition: q_shared.h:1019
MOVETYPE_STEP
@ MOVETYPE_STEP
Definition: g_local.h:194
boss2_move_attack_post_mg
mmove_t boss2_move_attack_post_mg
Definition: m_boss2.c:300
FRAME_pain19
#define FRAME_pain19
Definition: m_boss2.h:151
SVF_DEADMONSTER
#define SVF_DEADMONSTER
Definition: game.h:28
ATTN_NONE
#define ATTN_NONE
Definition: q_shared.h:1018
AngleVectors
void AngleVectors(vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
Definition: q_shared.c:93
boss2_frames_run
mframe_t boss2_frames_run[]
Definition: m_boss2.c:241
sound_pain2
static int sound_pain2
Definition: m_boss2.c:36
boss2_frames_attack_rocket
mframe_t boss2_frames_attack_rocket[]
Definition: m_boss2.c:302
monster_flash_offset
vec3_t monster_flash_offset[]
Definition: m_flash.c:27
CHAN_VOICE
#define CHAN_VOICE
Definition: q_shared.h:1009
boss2_stand
void boss2_stand(edict_t *self)
Definition: m_boss2.c:414
boss2_frames_pain_heavy
mframe_t boss2_frames_pain_heavy[]
Definition: m_boss2.c:328
DEFAULT_BULLET_VSPREAD
#define DEFAULT_BULLET_VSPREAD
Definition: g_local.h:665
edict_s
Definition: g_local.h:962
G_FreeEdict
void G_FreeEdict(edict_t *e)
Definition: g_utils.c:452
boss2_frames_attack_pre_mg
mframe_t boss2_frames_attack_pre_mg[]
Definition: m_boss2.c:266
FRAME_stand30
#define FRAME_stand30
Definition: m_boss2.h:24
AS_SLIDING
#define AS_SLIDING
Definition: g_local.h:145
boss2_frames_fidget
mframe_t boss2_frames_fidget[]
Definition: m_boss2.c:180
FRAME_pain23
#define FRAME_pain23
Definition: m_boss2.h:155
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
boss2_walk
void boss2_walk(edict_t *self)
Definition: m_boss2.c:427
AS_MISSILE
#define AS_MISSILE
Definition: g_local.h:147
game_import_t::modelindex
int(* modelindex)(char *name)
Definition: game.h:121
MZ2_BOSS2_MACHINEGUN_L1
#define MZ2_BOSS2_MACHINEGUN_L1
Definition: q_shared.h:777
boss2_attack_mg
void boss2_attack_mg(edict_t *self)
Definition: m_boss2.c:453
mframe_t
Definition: g_local.h:401
FRAME_attack19
#define FRAME_attack19
Definition: m_boss2.h:112
mmove_t
Definition: g_local.h:408
boss2_move_fidget
mmove_t boss2_move_fidget
Definition: m_boss2.c:213
FRAME_pain2
#define FRAME_pain2
Definition: m_boss2.h:134
cvar_s::value
float value
Definition: q_shared.h:324
ai_walk
void ai_walk(edict_t *self, float dist)
Definition: g_ai.c:163
FRAME_attack9
#define FRAME_attack9
Definition: m_boss2.h:102
random
#define random()
Definition: g_local.h:509
boss2_move_death
mmove_t boss2_move_death
Definition: m_boss2.c:412
DAMAGE_NO
@ DAMAGE_NO
Definition: g_local.h:86
VectorNormalize
vec_t VectorNormalize(vec3_t v)
Definition: q_shared.c:681
FRAME_stand1
#define FRAME_stand1
Definition: m_berserk.h:24
boss2_move_walk
mmove_t boss2_move_walk
Definition: m_boss2.c:238
NULL
#define NULL
Definition: q_shared.h:60
FRAME_stand50
#define FRAME_stand50
Definition: m_boss2.h:44
MZ2_BOSS2_ROCKET_2
#define MZ2_BOSS2_ROCKET_2
Definition: q_shared.h:783
boss2_frames_pain_light
mframe_t boss2_frames_pain_light[]
Definition: m_boss2.c:351
boss2_run
void boss2_run(edict_t *self)
Definition: m_boss2.c:419
FRAME_attack40
#define FRAME_attack40
Definition: m_boss2.h:133
FRAME_walk20
#define FRAME_walk20
Definition: m_boss2.h:93
monster_fire_bullet
void monster_fire_bullet(edict_t *self, vec3_t start, vec3_t dir, int damage, int kick, int hspread, int vspread, int flashtype)
Definition: g_monster.c:31
enemy_infront
qboolean enemy_infront
Definition: g_ai.c:30
FRAME_attack20
#define FRAME_attack20
Definition: m_boss2.h:113
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:71
boss2_move_attack_rocket
mmove_t boss2_move_attack_rocket
Definition: m_boss2.c:326
ai_move
void ai_move(edict_t *self, float dist)
Definition: g_ai.c:92
CONTENTS_SLIME
#define CONTENTS_SLIME
Definition: qfiles.h:337
FRAME_attack16
#define FRAME_attack16
Definition: m_boss2.h:109
VectorCopy
#define VectorCopy(a, b)
Definition: q_shared.h:158
FRAME_walk1
#define FRAME_walk1
Definition: m_boss2.h:74
RANGE_MELEE
#define RANGE_MELEE
Definition: g_local.h:117
FL_IMMUNE_LASER
#define FL_IMMUNE_LASER
Definition: g_local.h:59
Boss2Rocket
void Boss2Rocket(edict_t *self)
Definition: m_boss2.c:55
boss2_move_run
mmove_t boss2_move_run
Definition: m_boss2.c:264
level
GLint level
Definition: qgl_win.c:116
ai_run
void ai_run(edict_t *self, float dist)
Definition: g_ai.c:915
boss2_dead
void boss2_dead(edict_t *self)
Definition: m_boss2.c:497
enemy_range
int enemy_range
Definition: g_ai.c:31
boss2_frames_stand
mframe_t boss2_frames_stand[]
Definition: m_boss2.c:154
GIB_ORGANIC
#define GIB_ORGANIC
Definition: g_local.h:123
VectorMA
void VectorMA(vec3_t veca, float scale, vec3_t vecb, vec3_t vecc)
Definition: q_shared.c:719
CONTENTS_LAVA
#define CONTENTS_LAVA
Definition: qfiles.h:336
RANGE_MID
#define RANGE_MID
Definition: g_local.h:119
Boss2_CheckAttack
qboolean Boss2_CheckAttack(edict_t *self)
Definition: m_boss2.c:540
sound_search1
static int sound_search1
Definition: m_boss2.c:39
boss2_frames_death
mframe_t boss2_frames_death[]
Definition: m_boss2.c:360
trace_t::ent
struct edict_s * ent
Definition: q_shared.h:458
FL_FLY
#define FL_FLY
Definition: g_local.h:57
boss2_attack
void boss2_attack(edict_t *self)
Definition: m_boss2.c:432
ThrowHead
void ThrowHead(edict_t *self, char *gibname, int damage, int type)
Definition: g_misc.c:183
boss2_move_pain_heavy
mmove_t boss2_move_pain_heavy
Definition: m_boss2.c:349
boss2_move_pain_light
mmove_t boss2_move_pain_light
Definition: m_boss2.c:358
boss2_move_stand
mmove_t boss2_move_stand
Definition: m_boss2.c:178
MOVETYPE_TOSS
@ MOVETYPE_TOSS
Definition: g_local.h:196
VectorSet
#define VectorSet(v, x, y, z)
Definition: q_shared.h:161
right
GLdouble right
Definition: qgl_win.c:159
boss2_search
void boss2_search(edict_t *self)
Definition: m_boss2.c:41
boss2_die
void boss2_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: m_boss2.c:507
edict_s::enemy
edict_t * enemy
Definition: g_local.h:1070
game_import_t::linkentity
void(* linkentity)(edict_t *ent)
Definition: game.h:138
sound_pain3
static int sound_pain3
Definition: m_boss2.c:37
FRAME_death2
#define FRAME_death2
Definition: m_berserk.h:248
AS_MELEE
#define AS_MELEE
Definition: g_local.h:146
RANGE_FAR
#define RANGE_FAR
Definition: g_local.h:120
FRAME_death50
#define FRAME_death50
Definition: m_boss2.h:204
enemy_yaw
float enemy_yaw
Definition: g_ai.c:32
vec3_t
vec_t vec3_t[3]
Definition: q_shared.h:127
Boss2MachineGun
void Boss2MachineGun(edict_t *self)
Definition: m_boss2.c:130
edict_s::target
char * target
Definition: g_local.h:1011
MZ2_BOSS2_ROCKET_4
#define MZ2_BOSS2_ROCKET_4
Definition: q_shared.h:785
ai_stand
void ai_stand(edict_t *self, float dist)
Definition: g_ai.c:106
FRAME_pain20
#define FRAME_pain20
Definition: m_boss2.h:152
sound_pain1
static int sound_pain1
Definition: m_boss2.c:35
g_local.h
AS_STRAIGHT
#define AS_STRAIGHT
Definition: g_local.h:144
flymonster_start
void flymonster_start(edict_t *self)
Definition: g_monster.c:715
FRAME_attack10
#define FRAME_attack10
Definition: m_boss2.h:103