Quake II RTX doxygen  1.0 dev
m_supertank.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 SUPERTANK
22 
23 ==============================================================================
24 */
25 
26 #include "g_local.h"
27 #include "m_supertank.h"
28 
29 qboolean visible(edict_t *self, edict_t *other);
30 
31 static int sound_pain1;
32 static int sound_pain2;
33 static int sound_pain3;
34 static int sound_death;
35 static int sound_search1;
36 static int sound_search2;
37 
38 static int tread_sound;
39 
40 void BossExplode(edict_t *self);
41 
42 void TreadSound(edict_t *self)
43 {
44  gi.sound(self, CHAN_VOICE, tread_sound, 1, ATTN_NORM, 0);
45 }
46 
47 void supertank_search(edict_t *self)
48 {
49  if (random() < 0.5)
50  gi.sound(self, CHAN_VOICE, sound_search1, 1, ATTN_NORM, 0);
51  else
52  gi.sound(self, CHAN_VOICE, sound_search2, 1, ATTN_NORM, 0);
53 }
54 
55 
56 void supertank_dead(edict_t *self);
57 void supertankRocket(edict_t *self);
58 void supertankMachineGun(edict_t *self);
59 void supertank_reattack1(edict_t *self);
60 
61 
62 //
63 // stand
64 //
65 
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  { ai_stand, 0, NULL },
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  { 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 },
94  { ai_stand, 0, NULL },
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 },
105  { ai_stand, 0, NULL },
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 },
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  { ai_stand, 0, NULL },
123  { ai_stand, 0, NULL },
124  { ai_stand, 0, NULL },
125  { ai_stand, 0, NULL },
126  { ai_stand, 0, NULL }
127 };
129 
130 void supertank_stand(edict_t *self)
131 {
132  self->monsterinfo.currentmove = &supertank_move_stand;
133 }
134 
135 
137  { ai_run, 12, TreadSound },
138  { ai_run, 12, NULL },
139  { ai_run, 12, NULL },
140  { ai_run, 12, NULL },
141  { ai_run, 12, NULL },
142  { ai_run, 12, NULL },
143  { ai_run, 12, NULL },
144  { ai_run, 12, NULL },
145  { ai_run, 12, NULL },
146  { ai_run, 12, NULL },
147  { ai_run, 12, NULL },
148  { ai_run, 12, NULL },
149  { ai_run, 12, NULL },
150  { ai_run, 12, NULL },
151  { ai_run, 12, NULL },
152  { ai_run, 12, NULL },
153  { ai_run, 12, NULL },
154  { ai_run, 12, NULL }
155 };
157 
158 //
159 // walk
160 //
161 
162 
164  { ai_walk, 4, TreadSound },
165  { ai_walk, 4, NULL },
166  { ai_walk, 4, NULL },
167  { ai_walk, 4, NULL },
168  { ai_walk, 4, NULL },
169  { ai_walk, 4, NULL },
170  { ai_walk, 4, NULL },
171  { ai_walk, 4, NULL },
172  { ai_walk, 4, NULL },
173  { ai_walk, 4, NULL },
174  { ai_walk, 4, NULL },
175  { ai_walk, 4, NULL },
176  { ai_walk, 4, NULL },
177  { ai_walk, 4, NULL },
178  { ai_walk, 4, NULL },
179  { ai_walk, 4, NULL },
180  { ai_walk, 4, NULL },
181  { ai_walk, 4, NULL }
182 };
184 
185 void supertank_forward(edict_t *self)
186 {
187  self->monsterinfo.currentmove = &supertank_move_forward;
188 }
189 
190 void supertank_walk(edict_t *self)
191 {
192  self->monsterinfo.currentmove = &supertank_move_forward;
193 }
194 
195 void supertank_run(edict_t *self)
196 {
197  if (self->monsterinfo.aiflags & AI_STAND_GROUND)
198  self->monsterinfo.currentmove = &supertank_move_stand;
199  else
200  self->monsterinfo.currentmove = &supertank_move_run;
201 }
202 
204  { ai_move, 0, TreadSound },
205  { ai_move, 0, NULL },
206  { ai_move, 0, NULL },
207  { ai_move, 0, NULL },
208  { ai_move, 0, NULL },
209  { ai_move, 0, NULL },
210  { ai_move, 0, NULL },
211  { ai_move, 0, NULL },
212  { ai_move, 0, NULL },
213  { ai_move, 0, NULL },
214  { ai_move, 0, NULL },
215  { ai_move, 0, NULL },
216  { ai_move, 0, NULL },
217  { ai_move, 0, NULL },
218  { ai_move, 0, NULL },
219  { ai_move, 0, NULL },
220  { ai_move, 0, NULL },
221  { ai_move, 0, NULL }
222 };
224 
226  { ai_move, 0, TreadSound },
227  { ai_move, 0, NULL },
228  { ai_move, 0, NULL },
229  { ai_move, 0, NULL },
230  { ai_move, 0, NULL },
231  { ai_move, 0, NULL },
232  { ai_move, 0, NULL },
233  { ai_move, 0, NULL },
234  { ai_move, 0, NULL },
235  { ai_move, 0, NULL },
236  { ai_move, 0, NULL },
237  { ai_move, 0, NULL },
238  { ai_move, 0, NULL },
239  { ai_move, 0, NULL },
240  { ai_move, 0, NULL },
241  { ai_move, 0, NULL },
242  { ai_move, 0, NULL },
243  { ai_move, 0, NULL }
244 };
246 
247 
249  { ai_move, 0, NULL },
250  { ai_move, 0, NULL },
251  { ai_move, 0, NULL },
252  { ai_move, 0, NULL }
253 };
255 
257  { ai_move, 0, NULL },
258  { ai_move, 0, NULL },
259  { ai_move, 0, NULL },
260  { ai_move, 0, NULL }
261 };
263 
265  { ai_move, 0, NULL },
266  { ai_move, 0, NULL },
267  { ai_move, 0, NULL },
268  { ai_move, 0, NULL }
269 };
271 
273  { ai_move, 0, NULL },
274  { ai_move, 0, NULL },
275  { ai_move, 0, NULL },
276  { ai_move, 0, NULL },
277  { ai_move, 0, NULL },
278  { ai_move, 0, NULL },
279  { ai_move, 0, NULL },
280  { ai_move, 0, NULL },
281  { ai_move, 0, NULL },
282  { ai_move, 0, 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, 0, NULL },
294  { ai_move, 0, NULL },
295  { ai_move, 0, NULL },
296  { ai_move, 0, BossExplode }
297 };
299 
301  { ai_walk, 0, TreadSound },
302  { ai_walk, 0, NULL },
303  { ai_walk, 0, NULL },
304  { ai_walk, 0, NULL },
305  { ai_walk, 0, NULL },
306  { ai_walk, 0, NULL },
307  { ai_walk, 0, NULL },
308  { ai_walk, 0, NULL },
309  { ai_walk, 0, NULL },
310  { ai_walk, 0, NULL },
311  { ai_walk, 0, NULL },
312  { ai_walk, 0, NULL },
313  { ai_walk, 0, NULL },
314  { ai_walk, 0, NULL },
315  { ai_walk, 0, NULL },
316  { ai_walk, 0, NULL },
317  { ai_walk, 0, NULL },
318  { ai_walk, 0, NULL }
319 };
321 
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 };
331 
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  { ai_move, 0, NULL },
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 };
362 
364  { ai_charge, 0, NULL },
365  { ai_charge, 0, NULL },
366  { ai_charge, 0, NULL },
367  { ai_charge, 0, NULL },
368  { ai_charge, 0, NULL },
369  { ai_charge, 0, NULL },
370  { ai_charge, 0, NULL },
371  { ai_charge, 0, supertankRocket },
372  { ai_move, 0, NULL },
373  { ai_move, 0, NULL },
374  { ai_move, 0, supertankRocket },
375  { ai_move, 0, NULL },
376  { ai_move, 0, NULL },
377  { ai_move, 0, supertankRocket },
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 };
393 
401 
402 };
404 
406  { ai_move, 0, NULL },
407  { ai_move, 0, NULL },
408  { ai_move, 0, NULL },
409  { ai_move, 0, NULL },
410  { ai_move, 0, NULL },
411  { ai_move, 0, NULL },
412  { ai_move, 0, NULL },
413  { ai_move, 0, NULL },
414  { ai_move, 0, NULL },
415  { ai_move, 0, NULL },
416  { ai_move, 0, NULL },
417  { ai_move, 0, NULL },
418  { ai_move, 0, NULL },
419  { ai_move, 0, NULL }
420 };
422 
423 
424 void supertank_reattack1(edict_t *self)
425 {
426  if (visible(self, self->enemy))
427  if (random() < 0.9)
428  self->monsterinfo.currentmove = &supertank_move_attack1;
429  else
430  self->monsterinfo.currentmove = &supertank_move_end_attack1;
431  else
432  self->monsterinfo.currentmove = &supertank_move_end_attack1;
433 }
434 
435 void supertank_pain(edict_t *self, edict_t *other, float kick, int damage)
436 {
437 
438  if (self->health < (self->max_health / 2))
439  self->s.skinnum = 1;
440 
441  if (level.time < self->pain_debounce_time)
442  return;
443 
444  // Lessen the chance of him going into his pain frames
445  if (damage <= 25)
446  if (random() < 0.2)
447  return;
448 
449  // Don't go into pain if he's firing his rockets
450  if (skill->value >= 2)
451  if ((self->s.frame >= FRAME_attak2_1) && (self->s.frame <= FRAME_attak2_14))
452  return;
453 
454  self->pain_debounce_time = level.time + 3;
455 
456  if (skill->value == 3)
457  return; // no pain anims in nightmare
458 
459  if (damage <= 10) {
460  gi.sound(self, CHAN_VOICE, sound_pain1, 1, ATTN_NORM, 0);
461  self->monsterinfo.currentmove = &supertank_move_pain1;
462  } else if (damage <= 25) {
463  gi.sound(self, CHAN_VOICE, sound_pain3, 1, ATTN_NORM, 0);
464  self->monsterinfo.currentmove = &supertank_move_pain2;
465  } else {
466  gi.sound(self, CHAN_VOICE, sound_pain2, 1, ATTN_NORM, 0);
467  self->monsterinfo.currentmove = &supertank_move_pain3;
468  }
469 }
470 
471 
472 void supertankRocket(edict_t *self)
473 {
474  vec3_t forward, right;
475  vec3_t start;
476  vec3_t dir;
477  vec3_t vec;
478  int flash_number;
479 
480  if (self->s.frame == FRAME_attak2_8)
481  flash_number = MZ2_SUPERTANK_ROCKET_1;
482  else if (self->s.frame == FRAME_attak2_11)
483  flash_number = MZ2_SUPERTANK_ROCKET_2;
484  else // (self->s.frame == FRAME_attak2_14)
485  flash_number = MZ2_SUPERTANK_ROCKET_3;
486 
487  AngleVectors(self->s.angles, forward, right, NULL);
488  G_ProjectSource(self->s.origin, monster_flash_offset[flash_number], forward, right, start);
489 
490  VectorCopy(self->enemy->s.origin, vec);
491  vec[2] += self->enemy->viewheight;
492  VectorSubtract(vec, start, dir);
493  VectorNormalize(dir);
494 
495  monster_fire_rocket(self, start, dir, 50, 500, flash_number);
496 }
497 
498 void supertankMachineGun(edict_t *self)
499 {
500  vec3_t dir;
501  vec3_t vec;
502  vec3_t start;
503  vec3_t forward, right;
504  int flash_number;
505 
506  flash_number = MZ2_SUPERTANK_MACHINEGUN_1 + (self->s.frame - FRAME_attak1_1);
507 
508  //FIXME!!!
509  dir[0] = 0;
510  dir[1] = self->s.angles[1];
511  dir[2] = 0;
512 
513  AngleVectors(dir, forward, right, NULL);
514  G_ProjectSource(self->s.origin, monster_flash_offset[flash_number], forward, right, start);
515 
516  if (self->enemy) {
517  VectorCopy(self->enemy->s.origin, vec);
518  VectorMA(vec, 0, self->enemy->velocity, vec);
519  vec[2] += self->enemy->viewheight;
520  VectorSubtract(vec, start, forward);
522  }
523 
524  monster_fire_bullet(self, start, forward, 6, 4, DEFAULT_BULLET_HSPREAD, DEFAULT_BULLET_VSPREAD, flash_number);
525 }
526 
527 
528 void supertank_attack(edict_t *self)
529 {
530  vec3_t vec;
531  float range;
532  //float r;
533 
534  VectorSubtract(self->enemy->s.origin, self->s.origin, vec);
535  range = VectorLength(vec);
536 
537  //r = random();
538 
539  // Attack 1 == Chaingun
540  // Attack 2 == Rocket Launcher
541 
542  if (range <= 160) {
543  self->monsterinfo.currentmove = &supertank_move_attack1;
544  } else {
545  // fire rockets more often at distance
546  if (random() < 0.3)
547  self->monsterinfo.currentmove = &supertank_move_attack1;
548  else
549  self->monsterinfo.currentmove = &supertank_move_attack2;
550  }
551 }
552 
553 
554 //
555 // death
556 //
557 
558 void supertank_dead(edict_t *self)
559 {
560  VectorSet(self->mins, -60, -60, 0);
561  VectorSet(self->maxs, 60, 60, 72);
562  self->movetype = MOVETYPE_TOSS;
563  self->svflags |= SVF_DEADMONSTER;
564  self->nextthink = 0;
565  gi.linkentity(self);
566 }
567 
568 
569 void BossExplode(edict_t *self)
570 {
571  vec3_t org;
572  int n;
573 
574  self->think = BossExplode;
575  VectorCopy(self->s.origin, org);
576  org[2] += 24 + (rand() & 15);
577  switch (self->count++) {
578  case 0:
579  org[0] -= 24;
580  org[1] -= 24;
581  break;
582  case 1:
583  org[0] += 24;
584  org[1] += 24;
585  break;
586  case 2:
587  org[0] += 24;
588  org[1] -= 24;
589  break;
590  case 3:
591  org[0] -= 24;
592  org[1] += 24;
593  break;
594  case 4:
595  org[0] -= 48;
596  org[1] -= 48;
597  break;
598  case 5:
599  org[0] += 48;
600  org[1] += 48;
601  break;
602  case 6:
603  org[0] -= 48;
604  org[1] += 48;
605  break;
606  case 7:
607  org[0] += 48;
608  org[1] -= 48;
609  break;
610  case 8:
611  self->s.sound = 0;
612  for (n = 0; n < 4; n++)
613  ThrowGib(self, "models/objects/gibs/sm_meat/tris.md2", 500, GIB_ORGANIC);
614  for (n = 0; n < 8; n++)
615  ThrowGib(self, "models/objects/gibs/sm_metal/tris.md2", 500, GIB_METALLIC);
616  ThrowGib(self, "models/objects/gibs/chest/tris.md2", 500, GIB_ORGANIC);
617  ThrowHead(self, "models/objects/gibs/gear/tris.md2", 500, GIB_METALLIC);
618  self->deadflag = DEAD_DEAD;
619  return;
620  }
621 
622  gi.WriteByte(svc_temp_entity);
623  gi.WriteByte(TE_EXPLOSION1);
624  gi.WritePosition(org);
625  gi.multicast(self->s.origin, MULTICAST_PVS);
626 
627  self->nextthink = level.time + 0.1;
628 }
629 
630 
631 void supertank_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
632 {
633  gi.sound(self, CHAN_VOICE, sound_death, 1, ATTN_NORM, 0);
634  self->deadflag = DEAD_DEAD;
635  self->takedamage = DAMAGE_NO;
636  self->count = 0;
637  self->monsterinfo.currentmove = &supertank_move_death;
638 }
639 
640 //
641 // monster_supertank
642 //
643 
644 /*QUAKED monster_supertank (1 .5 0) (-64 -64 0) (64 64 72) Ambush Trigger_Spawn Sight
645 */
646 void SP_monster_supertank(edict_t *self)
647 {
648  if (deathmatch->value) {
649  G_FreeEdict(self);
650  return;
651  }
652 
653  sound_pain1 = gi.soundindex("bosstank/btkpain1.wav");
654  sound_pain2 = gi.soundindex("bosstank/btkpain2.wav");
655  sound_pain3 = gi.soundindex("bosstank/btkpain3.wav");
656  sound_death = gi.soundindex("bosstank/btkdeth1.wav");
657  sound_search1 = gi.soundindex("bosstank/btkunqv1.wav");
658  sound_search2 = gi.soundindex("bosstank/btkunqv2.wav");
659 
660 // self->s.sound = gi.soundindex ("bosstank/btkengn1.wav");
661  tread_sound = gi.soundindex("bosstank/btkengn1.wav");
662 
663  self->movetype = MOVETYPE_STEP;
664  self->solid = SOLID_BBOX;
665  self->s.modelindex = gi.modelindex("models/monsters/boss1/tris.md2");
666  VectorSet(self->mins, -64, -64, 0);
667  VectorSet(self->maxs, 64, 64, 112);
668 
669  self->health = 1500;
670  self->gib_health = -500;
671  self->mass = 800;
672 
673  self->pain = supertank_pain;
674  self->die = supertank_die;
675  self->monsterinfo.stand = supertank_stand;
676  self->monsterinfo.walk = supertank_walk;
677  self->monsterinfo.run = supertank_run;
678  self->monsterinfo.dodge = NULL;
679  self->monsterinfo.attack = supertank_attack;
680  self->monsterinfo.search = supertank_search;
681  self->monsterinfo.melee = NULL;
682  self->monsterinfo.sight = NULL;
683 
684  gi.linkentity(self);
685 
686  self->monsterinfo.currentmove = &supertank_move_stand;
687  self->monsterinfo.scale = MODEL_SCALE;
688 
689  walkmonster_start(self);
690 }
FRAME_pain3_12
#define FRAME_pain3_12
Definition: m_supertank.h:197
gi
game_import_t gi
Definition: g_main.c:23
supertank_move_stand
mmove_t supertank_move_stand
Definition: m_supertank.c:128
sound_search1
static int sound_search1
Definition: m_supertank.c:35
supertank_frames_attack2
mframe_t supertank_frames_attack2[]
Definition: m_supertank.c:363
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
FRAME_attak1_7
#define FRAME_attak1_7
Definition: m_supertank.h:28
FRAME_stand_1
#define FRAME_stand_1
Definition: m_supertank.h:216
DEFAULT_BULLET_HSPREAD
#define DEFAULT_BULLET_HSPREAD
Definition: g_local.h:654
ThrowGib
void ThrowGib(edict_t *self, char *gibname, int damage, int type)
Definition: g_misc.c:130
FRAME_right_1
#define FRAME_right_1
Definition: m_supertank.h:198
supertank_frames_pain3
mframe_t supertank_frames_pain3[]
Definition: m_supertank.c:248
ai_charge
void ai_charge(edict_t *self, float dist)
Definition: g_ai.c:175
supertank_frames_turn_right
mframe_t supertank_frames_turn_right[]
Definition: m_supertank.c:203
supertank_dead
void supertank_dead(edict_t *self)
Definition: m_supertank.c:558
supertank_move_attack1
mmove_t supertank_move_attack1
Definition: m_supertank.c:403
FRAME_pain3_9
#define FRAME_pain3_9
Definition: m_supertank.h:194
FRAME_attak2_1
#define FRAME_attak2_1
Definition: m_supertank.h:42
FRAME_pain2_8
#define FRAME_pain2_8
Definition: m_supertank.h:193
supertank_frames_forward
mframe_t supertank_frames_forward[]
Definition: m_supertank.c:163
FRAME_backwd_18
#define FRAME_backwd_18
Definition: m_supertank.h:119
supertank_frames_attack1
mframe_t supertank_frames_attack1[]
Definition: m_supertank.c:394
FRAME_attak4_1
#define FRAME_attak4_1
Definition: m_supertank.h:96
AI_STAND_GROUND
#define AI_STAND_GROUND
Definition: g_local.h:126
supertank_frames_death1
mframe_t supertank_frames_death1[]
Definition: m_supertank.c:272
supertank_forward
void supertank_forward(edict_t *self)
Definition: m_supertank.c:185
MODEL_SCALE
#define MODEL_SCALE
Definition: m_actor.h:504
FRAME_attak1_6
#define FRAME_attak1_6
Definition: m_supertank.h:27
supertank_frames_turn_left
mframe_t supertank_frames_turn_left[]
Definition: m_supertank.c:225
FRAME_left_18
#define FRAME_left_18
Definition: m_supertank.h:185
supertank_move_attack4
mmove_t supertank_move_attack4
Definition: m_supertank.c:330
sound_pain3
static int sound_pain3
Definition: m_supertank.c:33
other
@ other
Definition: ogg.c:63
supertank_move_run
mmove_t supertank_move_run
Definition: m_supertank.c:156
walkmonster_start
void walkmonster_start(edict_t *self)
Definition: g_monster.c:630
MOVETYPE_STEP
@ MOVETYPE_STEP
Definition: g_local.h:192
FRAME_pain1_4
#define FRAME_pain1_4
Definition: m_supertank.h:189
visible
qboolean visible(edict_t *self, edict_t *other)
Definition: g_ai.c:268
FRAME_left_1
#define FRAME_left_1
Definition: m_supertank.h:168
supertank_frames_pain2
mframe_t supertank_frames_pain2[]
Definition: m_supertank.c:256
FRAME_attak2_11
#define FRAME_attak2_11
Definition: m_supertank.h:52
supertank_walk
void supertank_walk(edict_t *self)
Definition: m_supertank.c:190
FRAME_attak4_6
#define FRAME_attak4_6
Definition: m_supertank.h:101
DEFAULT_BULLET_VSPREAD
#define DEFAULT_BULLET_VSPREAD
Definition: g_local.h:655
FRAME_death_24
#define FRAME_death_24
Definition: m_supertank.h:143
FRAME_attak2_8
#define FRAME_attak2_8
Definition: m_supertank.h:49
FRAME_forwrd_18
#define FRAME_forwrd_18
Definition: m_supertank.h:167
G_FreeEdict
void G_FreeEdict(edict_t *e)
Definition: g_utils.c:421
GIB_METALLIC
#define GIB_METALLIC
Definition: g_local.h:123
supertank_stand
void supertank_stand(edict_t *self)
Definition: m_supertank.c:130
supertank_move_forward
mmove_t supertank_move_forward
Definition: m_supertank.c:183
supertank_frames_attack4
mframe_t supertank_frames_attack4[]
Definition: m_supertank.c:322
forward
static vec3_t forward
Definition: p_view.c:27
svc_temp_entity
#define svc_temp_entity
Definition: g_local.h:38
supertank_move_attack2
mmove_t supertank_move_attack2
Definition: m_supertank.c:392
mframe_t
Definition: g_local.h:394
sound_pain1
static int sound_pain1
Definition: m_supertank.c:31
mmove_t
Definition: g_local.h:400
supertank_frames_stand
mframe_t supertank_frames_stand[]
Definition: m_supertank.c:66
supertank_move_end_attack1
mmove_t supertank_move_end_attack1
Definition: m_supertank.c:421
supertank_run
void supertank_run(edict_t *self)
Definition: m_supertank.c:195
sound_search2
static int sound_search2
Definition: m_supertank.c:36
supertank_frames_backward
mframe_t supertank_frames_backward[]
Definition: m_supertank.c:300
FRAME_attak2_14
#define FRAME_attak2_14
Definition: m_supertank.h:55
ai_walk
void ai_walk(edict_t *self, float dist)
Definition: g_ai.c:148
random
#define random()
Definition: g_local.h:504
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_attak2_27
#define FRAME_attak2_27
Definition: m_supertank.h:68
supertank_move_pain2
mmove_t supertank_move_pain2
Definition: m_supertank.c:262
supertank_move_backward
mmove_t supertank_move_backward
Definition: m_supertank.c:320
FRAME_attak3_27
#define FRAME_attak3_27
Definition: m_supertank.h:95
FRAME_right_18
#define FRAME_right_18
Definition: m_supertank.h:215
sound_death
static int sound_death
Definition: m_supertank.c:34
tread_sound
static int tread_sound
Definition: m_supertank.c:38
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
supertank_move_turn_right
mmove_t supertank_move_turn_right
Definition: m_supertank.c:223
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
SP_monster_supertank
void SP_monster_supertank(edict_t *self)
Definition: m_supertank.c:646
skill
cvar_t * skill
Definition: g_main.c:36
supertank_frames_end_attack1
mframe_t supertank_frames_end_attack1[]
Definition: m_supertank.c:405
ai_move
void ai_move(edict_t *self, float dist)
Definition: g_ai.c:86
supertank_reattack1
void supertank_reattack1(edict_t *self)
Definition: m_supertank.c:424
supertank_frames_pain1
mframe_t supertank_frames_pain1[]
Definition: m_supertank.c:264
level_locals_t::time
float time
Definition: g_local.h:299
BossExplode
void BossExplode(edict_t *self)
Definition: m_supertank.c:569
supertank_move_attack3
mmove_t supertank_move_attack3
Definition: m_supertank.c:361
supertank_move_pain3
mmove_t supertank_move_pain3
Definition: m_supertank.c:254
supertank_frames_attack3
mframe_t supertank_frames_attack3[]
Definition: m_supertank.c:332
FRAME_stand_60
#define FRAME_stand_60
Definition: m_supertank.h:275
TreadSound
void TreadSound(edict_t *self)
Definition: m_supertank.c:42
sound_pain2
static int sound_pain2
Definition: m_supertank.c:32
supertank_move_turn_left
mmove_t supertank_move_turn_left
Definition: m_supertank.c:245
supertank_attack
void supertank_attack(edict_t *self)
Definition: m_supertank.c:528
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
FRAME_backwd_1
#define FRAME_backwd_1
Definition: m_supertank.h:102
GIB_ORGANIC
#define GIB_ORGANIC
Definition: g_local.h:122
level
level_locals_t level
Definition: g_main.c:22
FRAME_attak1_1
#define FRAME_attak1_1
Definition: m_supertank.h:22
monster_flash_offset
const vec3_t monster_flash_offset[256]
Definition: m_flash.c:25
ThrowHead
void ThrowHead(edict_t *self, char *gibname, int damage, int type)
Definition: g_misc.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
supertankMachineGun
void supertankMachineGun(edict_t *self)
Definition: m_supertank.c:498
supertank_move_death
mmove_t supertank_move_death
Definition: m_supertank.c:298
m_supertank.h
FRAME_forwrd_1
#define FRAME_forwrd_1
Definition: m_supertank.h:150
FRAME_pain1_1
#define FRAME_pain1_1
Definition: m_supertank.h:186
FRAME_attak1_20
#define FRAME_attak1_20
Definition: m_supertank.h:41
FRAME_death_1
#define FRAME_death_1
Definition: m_supertank.h:120
supertank_search
void supertank_search(edict_t *self)
Definition: m_supertank.c:47
VectorNormalize
vec_t VectorNormalize(vec3_t v)
Definition: shared.c:55
FRAME_pain2_5
#define FRAME_pain2_5
Definition: m_supertank.h:190
supertank_frames_run
mframe_t supertank_frames_run[]
Definition: m_supertank.c:136
supertank_pain
void supertank_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: m_supertank.c:435
FRAME_attak3_1
#define FRAME_attak3_1
Definition: m_supertank.h:69
supertank_die
void supertank_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: m_supertank.c:631
ai_stand
void ai_stand(edict_t *self, float dist)
Definition: g_ai.c:100
g_local.h
supertankRocket
void supertankRocket(edict_t *self)
Definition: m_supertank.c:472
supertank_move_pain1
mmove_t supertank_move_pain1
Definition: m_supertank.c:270