Quake II RTX doxygen  1.0 dev
m_infantry.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 INFANTRY
22 
23 ==============================================================================
24 */
25 
26 #include "g_local.h"
27 #include "m_infantry.h"
28 
29 void InfantryMachineGun(edict_t *self);
30 
31 
32 static int sound_pain1;
33 static int sound_pain2;
34 static int sound_die1;
35 static int sound_die2;
36 
37 static int sound_gunshot;
38 static int sound_weapon_cock;
39 static int sound_punch_swing;
40 static int sound_punch_hit;
41 static int sound_sight;
42 static int sound_search;
43 static int sound_idle;
44 
45 
47  { ai_stand, 0, NULL },
48  { ai_stand, 0, NULL },
49  { ai_stand, 0, NULL },
50  { ai_stand, 0, NULL },
51  { ai_stand, 0, NULL },
52  { ai_stand, 0, NULL },
53  { ai_stand, 0, NULL },
54  { ai_stand, 0, NULL },
55  { ai_stand, 0, NULL },
56  { ai_stand, 0, NULL },
57  { ai_stand, 0, NULL },
58  { ai_stand, 0, NULL },
59  { ai_stand, 0, NULL },
60  { ai_stand, 0, NULL },
61  { ai_stand, 0, NULL },
62  { ai_stand, 0, NULL },
63  { ai_stand, 0, NULL },
64  { ai_stand, 0, NULL },
65  { ai_stand, 0, NULL },
66  { ai_stand, 0, NULL },
67  { ai_stand, 0, NULL },
68  { ai_stand, 0, NULL }
69 };
71 
72 void infantry_stand(edict_t *self)
73 {
74  self->monsterinfo.currentmove = &infantry_move_stand;
75 }
76 
77 
79  { ai_stand, 1, NULL },
80  { ai_stand, 0, NULL },
81  { ai_stand, 1, NULL },
82  { ai_stand, 3, NULL },
83  { ai_stand, 6, NULL },
84  { ai_stand, 3, NULL },
85  { ai_stand, 0, NULL },
86  { ai_stand, 0, NULL },
87  { ai_stand, 0, NULL },
88  { ai_stand, 0, NULL },
89  { ai_stand, 1, NULL },
90  { ai_stand, 0, NULL },
91  { ai_stand, 0, NULL },
92  { ai_stand, 0, NULL },
93  { ai_stand, 0, NULL },
94  { ai_stand, 1, NULL },
95  { ai_stand, 0, NULL },
96  { ai_stand, -1, NULL },
97  { ai_stand, 0, NULL },
98  { ai_stand, 0, NULL },
99  { ai_stand, 1, NULL },
100  { ai_stand, 0, NULL },
101  { ai_stand, -2, NULL },
102  { ai_stand, 1, NULL },
103  { ai_stand, 1, NULL },
104  { ai_stand, 1, NULL },
105  { ai_stand, -1, NULL },
106  { ai_stand, 0, NULL },
107  { ai_stand, 0, NULL },
108  { ai_stand, -1, 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, -1, NULL },
115  { ai_stand, 0, NULL },
116  { ai_stand, 0, NULL },
117  { ai_stand, 1, NULL },
118  { ai_stand, 0, NULL },
119  { ai_stand, 0, NULL },
120  { ai_stand, -1, NULL },
121  { ai_stand, -1, NULL },
122  { ai_stand, 0, NULL },
123  { ai_stand, -3, NULL },
124  { ai_stand, -2, NULL },
125  { ai_stand, -3, NULL },
126  { ai_stand, -3, NULL },
127  { ai_stand, -2, NULL }
128 };
130 
131 void infantry_fidget(edict_t *self)
132 {
133  self->monsterinfo.currentmove = &infantry_move_fidget;
134  gi.sound(self, CHAN_VOICE, sound_idle, 1, ATTN_IDLE, 0);
135 }
136 
138  { ai_walk, 5, NULL },
139  { ai_walk, 4, NULL },
140  { ai_walk, 4, NULL },
141  { ai_walk, 5, NULL },
142  { ai_walk, 4, NULL },
143  { ai_walk, 5, NULL },
144  { ai_walk, 6, NULL },
145  { ai_walk, 4, NULL },
146  { ai_walk, 4, NULL },
147  { ai_walk, 4, NULL },
148  { ai_walk, 4, NULL },
149  { ai_walk, 5, NULL }
150 };
152 
153 void infantry_walk(edict_t *self)
154 {
155  self->monsterinfo.currentmove = &infantry_move_walk;
156 }
157 
159  { ai_run, 10, NULL },
160  { ai_run, 20, NULL },
161  { ai_run, 5, NULL },
162  { ai_run, 7, NULL },
163  { ai_run, 30, NULL },
164  { ai_run, 35, NULL },
165  { ai_run, 2, NULL },
166  { ai_run, 6, NULL }
167 };
169 
170 void infantry_run(edict_t *self)
171 {
172  if (self->monsterinfo.aiflags & AI_STAND_GROUND)
173  self->monsterinfo.currentmove = &infantry_move_stand;
174  else
175  self->monsterinfo.currentmove = &infantry_move_run;
176 }
177 
178 
180  { ai_move, -3, NULL },
181  { ai_move, -2, NULL },
182  { ai_move, -1, NULL },
183  { ai_move, -2, NULL },
184  { ai_move, -1, NULL },
185  { ai_move, 1, NULL },
186  { ai_move, -1, NULL },
187  { ai_move, 1, NULL },
188  { ai_move, 6, NULL },
189  { ai_move, 2, NULL }
190 };
192 
194  { ai_move, -3, NULL },
195  { ai_move, -3, NULL },
196  { ai_move, 0, NULL },
197  { ai_move, -1, NULL },
198  { ai_move, -2, NULL },
199  { ai_move, 0, NULL },
200  { ai_move, 0, NULL },
201  { ai_move, 2, NULL },
202  { ai_move, 5, NULL },
203  { ai_move, 2, NULL }
204 };
206 
207 void infantry_pain(edict_t *self, edict_t *other, float kick, int damage)
208 {
209  int n;
210 
211  if (self->health < (self->max_health / 2))
212  self->s.skinnum = 1;
213 
214  if (level.time < self->pain_debounce_time)
215  return;
216 
217  self->pain_debounce_time = level.time + 3;
218 
219  if (skill->value == 3)
220  return; // no pain anims in nightmare
221 
222  n = rand() % 2;
223  if (n == 0) {
224  self->monsterinfo.currentmove = &infantry_move_pain1;
225  gi.sound(self, CHAN_VOICE, sound_pain1, 1, ATTN_NORM, 0);
226  } else {
227  self->monsterinfo.currentmove = &infantry_move_pain2;
228  gi.sound(self, CHAN_VOICE, sound_pain2, 1, ATTN_NORM, 0);
229  }
230 }
231 
232 
233 vec3_t aimangles[] = {
234  { 0.0, 5.0, 0.0 },
235  { 10.0, 15.0, 0.0 },
236  { 20.0, 25.0, 0.0 },
237  { 25.0, 35.0, 0.0 },
238  { 30.0, 40.0, 0.0 },
239  { 30.0, 45.0, 0.0 },
240  { 25.0, 50.0, 0.0 },
241  { 20.0, 40.0, 0.0 },
242  { 15.0, 35.0, 0.0 },
243  { 40.0, 35.0, 0.0 },
244  { 70.0, 35.0, 0.0 },
245  { 90.0, 35.0, 0.0 }
246 };
247 
248 void InfantryMachineGun(edict_t *self)
249 {
250  vec3_t start, target;
251  vec3_t forward, right;
252  vec3_t vec;
253  int flash_number;
254 
255  if (self->s.frame == FRAME_attak111) {
256  flash_number = MZ2_INFANTRY_MACHINEGUN_1;
257  AngleVectors(self->s.angles, forward, right, NULL);
258  G_ProjectSource(self->s.origin, monster_flash_offset[flash_number], forward, right, start);
259 
260  if (self->enemy) {
261  VectorMA(self->enemy->s.origin, -0.2, self->enemy->velocity, target);
262  target[2] += self->enemy->viewheight;
263  VectorSubtract(target, start, forward);
265  } else {
266  AngleVectors(self->s.angles, forward, right, NULL);
267  }
268  } else {
269  flash_number = MZ2_INFANTRY_MACHINEGUN_2 + (self->s.frame - FRAME_death211);
270 
271  AngleVectors(self->s.angles, forward, right, NULL);
272  G_ProjectSource(self->s.origin, monster_flash_offset[flash_number], forward, right, start);
273 
274  VectorSubtract(self->s.angles, aimangles[flash_number - MZ2_INFANTRY_MACHINEGUN_2], vec);
275  AngleVectors(vec, forward, NULL, NULL);
276  }
277 
278  monster_fire_bullet(self, start, forward, 3, 4, DEFAULT_BULLET_HSPREAD, DEFAULT_BULLET_VSPREAD, flash_number);
279 }
280 
281 void infantry_sight(edict_t *self, edict_t *other)
282 {
283  gi.sound(self, CHAN_BODY, sound_sight, 1, ATTN_NORM, 0);
284 }
285 
286 void infantry_dead(edict_t *self)
287 {
288  VectorSet(self->mins, -16, -16, -24);
289  VectorSet(self->maxs, 16, 16, -8);
290  self->movetype = MOVETYPE_TOSS;
291  self->svflags |= SVF_DEADMONSTER;
292  gi.linkentity(self);
293 
294  M_FlyCheck(self);
295 }
296 
298  { ai_move, -4, NULL },
299  { ai_move, 0, NULL },
300  { ai_move, 0, NULL },
301  { ai_move, -1, NULL },
302  { ai_move, -4, NULL },
303  { ai_move, 0, NULL },
304  { ai_move, 0, NULL },
305  { ai_move, 0, NULL },
306  { ai_move, -1, NULL },
307  { ai_move, 3, NULL },
308  { ai_move, 1, NULL },
309  { ai_move, 1, NULL },
310  { ai_move, -2, NULL },
311  { ai_move, 2, NULL },
312  { ai_move, 2, NULL },
313  { ai_move, 9, NULL },
314  { ai_move, 9, NULL },
315  { ai_move, 5, NULL },
316  { ai_move, -3, NULL },
317  { ai_move, -3, NULL }
318 };
320 
321 // Off with his head
323  { ai_move, 0, NULL },
324  { ai_move, 1, NULL },
325  { ai_move, 5, NULL },
326  { ai_move, -1, NULL },
327  { ai_move, 0, NULL },
328  { ai_move, 1, NULL },
329  { ai_move, 1, NULL },
330  { ai_move, 4, NULL },
331  { ai_move, 3, NULL },
332  { ai_move, 0, NULL },
333  { ai_move, -2, InfantryMachineGun },
334  { ai_move, -2, InfantryMachineGun },
335  { ai_move, -3, InfantryMachineGun },
336  { ai_move, -1, InfantryMachineGun },
337  { ai_move, -2, InfantryMachineGun },
338  { ai_move, 0, InfantryMachineGun },
339  { ai_move, 2, InfantryMachineGun },
340  { ai_move, 2, InfantryMachineGun },
341  { ai_move, 3, InfantryMachineGun },
342  { ai_move, -10, InfantryMachineGun },
343  { ai_move, -7, InfantryMachineGun },
344  { ai_move, -8, InfantryMachineGun },
345  { ai_move, -6, NULL },
346  { ai_move, 4, NULL },
347  { ai_move, 0, NULL }
348 };
350 
352  { ai_move, 0, NULL },
353  { ai_move, 0, NULL },
354  { ai_move, 0, NULL },
355  { ai_move, -6, NULL },
356  { ai_move, -11, NULL },
357  { ai_move, -3, NULL },
358  { ai_move, -11, NULL },
359  { ai_move, 0, NULL },
360  { ai_move, 0, NULL }
361 };
363 
364 
365 void infantry_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
366 {
367  int n;
368 
369 // check for gib
370  if (self->health <= self->gib_health) {
371  gi.sound(self, CHAN_VOICE, gi.soundindex("misc/udeath.wav"), 1, ATTN_NORM, 0);
372  for (n = 0; n < 2; n++)
373  ThrowGib(self, "models/objects/gibs/bone/tris.md2", damage, GIB_ORGANIC);
374  for (n = 0; n < 4; n++)
375  ThrowGib(self, "models/objects/gibs/sm_meat/tris.md2", damage, GIB_ORGANIC);
376  ThrowHead(self, "models/objects/gibs/head2/tris.md2", damage, GIB_ORGANIC);
377  self->deadflag = DEAD_DEAD;
378  return;
379  }
380 
381  if (self->deadflag == DEAD_DEAD)
382  return;
383 
384 // regular death
385  self->deadflag = DEAD_DEAD;
386  self->takedamage = DAMAGE_YES;
387 
388  n = rand() % 3;
389  if (n == 0) {
390  self->monsterinfo.currentmove = &infantry_move_death1;
391  gi.sound(self, CHAN_VOICE, sound_die2, 1, ATTN_NORM, 0);
392  } else if (n == 1) {
393  self->monsterinfo.currentmove = &infantry_move_death2;
394  gi.sound(self, CHAN_VOICE, sound_die1, 1, ATTN_NORM, 0);
395  } else {
396  self->monsterinfo.currentmove = &infantry_move_death3;
397  gi.sound(self, CHAN_VOICE, sound_die2, 1, ATTN_NORM, 0);
398  }
399 }
400 
401 
402 void infantry_duck_down(edict_t *self)
403 {
404  if (self->monsterinfo.aiflags & AI_DUCKED)
405  return;
406  self->monsterinfo.aiflags |= AI_DUCKED;
407  self->maxs[2] -= 32;
408  self->takedamage = DAMAGE_YES;
409  self->monsterinfo.pausetime = level.time + 1;
410  gi.linkentity(self);
411 }
412 
413 void infantry_duck_hold(edict_t *self)
414 {
415  if (level.time >= self->monsterinfo.pausetime)
416  self->monsterinfo.aiflags &= ~AI_HOLD_FRAME;
417  else
418  self->monsterinfo.aiflags |= AI_HOLD_FRAME;
419 }
420 
421 void infantry_duck_up(edict_t *self)
422 {
423  self->monsterinfo.aiflags &= ~AI_DUCKED;
424  self->maxs[2] += 32;
425  self->takedamage = DAMAGE_AIM;
426  gi.linkentity(self);
427 }
428 
430  { ai_move, -2, infantry_duck_down },
431  { ai_move, -5, infantry_duck_hold },
432  { ai_move, 3, NULL },
433  { ai_move, 4, infantry_duck_up },
434  { ai_move, 0, NULL }
435 };
437 
438 void infantry_dodge(edict_t *self, edict_t *attacker, float eta)
439 {
440  if (random() > 0.25)
441  return;
442 
443  if (!self->enemy)
444  self->enemy = attacker;
445 
446  self->monsterinfo.currentmove = &infantry_move_duck;
447 }
448 
449 
450 void infantry_cock_gun(edict_t *self)
451 {
452  int n;
453 
454  gi.sound(self, CHAN_WEAPON, sound_weapon_cock, 1, ATTN_NORM, 0);
455  n = (rand() & 15) + 3 + 7;
456  self->monsterinfo.pausetime = level.time + n * FRAMETIME;
457 }
458 
459 void infantry_fire(edict_t *self)
460 {
461  InfantryMachineGun(self);
462 
463  if (level.time >= self->monsterinfo.pausetime)
464  self->monsterinfo.aiflags &= ~AI_HOLD_FRAME;
465  else
466  self->monsterinfo.aiflags |= AI_HOLD_FRAME;
467 }
468 
470  { ai_charge, 4, NULL },
471  { ai_charge, -1, NULL },
472  { ai_charge, -1, NULL },
474  { ai_charge, -1, NULL },
475  { ai_charge, 1, NULL },
476  { ai_charge, 1, NULL },
477  { ai_charge, 2, NULL },
478  { ai_charge, -2, NULL },
479  { ai_charge, -3, NULL },
480  { ai_charge, 1, infantry_fire },
481  { ai_charge, 5, NULL },
482  { ai_charge, -1, NULL },
483  { ai_charge, -2, NULL },
484  { ai_charge, -3, NULL }
485 };
487 
488 
489 void infantry_swing(edict_t *self)
490 {
491  gi.sound(self, CHAN_WEAPON, sound_punch_swing, 1, ATTN_NORM, 0);
492 }
493 
494 void infantry_smack(edict_t *self)
495 {
496  vec3_t aim;
497 
498  VectorSet(aim, MELEE_DISTANCE, 0, 0);
499  if (fire_hit(self, aim, (5 + (rand() % 5)), 50))
500  gi.sound(self, CHAN_WEAPON, sound_punch_hit, 1, ATTN_NORM, 0);
501 }
502 
504  { ai_charge, 3, NULL },
505  { ai_charge, 6, NULL },
506  { ai_charge, 0, infantry_swing },
507  { ai_charge, 8, NULL },
508  { ai_charge, 5, NULL },
509  { ai_charge, 8, infantry_smack },
510  { ai_charge, 6, NULL },
511  { ai_charge, 3, NULL },
512 };
514 
515 void infantry_attack(edict_t *self)
516 {
517  if (range(self, self->enemy) == RANGE_MELEE)
518  self->monsterinfo.currentmove = &infantry_move_attack2;
519  else
520  self->monsterinfo.currentmove = &infantry_move_attack1;
521 }
522 
523 
524 /*QUAKED monster_infantry (1 .5 0) (-16 -16 -24) (16 16 32) Ambush Trigger_Spawn Sight
525 */
526 void SP_monster_infantry(edict_t *self)
527 {
528  if (deathmatch->value) {
529  G_FreeEdict(self);
530  return;
531  }
532 
533  sound_pain1 = gi.soundindex("infantry/infpain1.wav");
534  sound_pain2 = gi.soundindex("infantry/infpain2.wav");
535  sound_die1 = gi.soundindex("infantry/infdeth1.wav");
536  sound_die2 = gi.soundindex("infantry/infdeth2.wav");
537 
538  sound_gunshot = gi.soundindex("infantry/infatck1.wav");
539  sound_weapon_cock = gi.soundindex("infantry/infatck3.wav");
540  sound_punch_swing = gi.soundindex("infantry/infatck2.wav");
541  sound_punch_hit = gi.soundindex("infantry/melee2.wav");
542 
543  sound_sight = gi.soundindex("infantry/infsght1.wav");
544  sound_search = gi.soundindex("infantry/infsrch1.wav");
545  sound_idle = gi.soundindex("infantry/infidle1.wav");
546 
547 
548  self->movetype = MOVETYPE_STEP;
549  self->solid = SOLID_BBOX;
550  self->s.modelindex = gi.modelindex("models/monsters/infantry/tris.md2");
551  VectorSet(self->mins, -16, -16, -24);
552  VectorSet(self->maxs, 16, 16, 32);
553 
554  self->health = 100;
555  self->gib_health = -40;
556  self->mass = 200;
557 
558  self->pain = infantry_pain;
559  self->die = infantry_die;
560 
561  self->monsterinfo.stand = infantry_stand;
562  self->monsterinfo.walk = infantry_walk;
563  self->monsterinfo.run = infantry_run;
564  self->monsterinfo.dodge = infantry_dodge;
565  self->monsterinfo.attack = infantry_attack;
566  self->monsterinfo.melee = NULL;
567  self->monsterinfo.sight = infantry_sight;
568  self->monsterinfo.idle = infantry_fidget;
569 
570  gi.linkentity(self);
571 
572  self->monsterinfo.currentmove = &infantry_move_stand;
573  self->monsterinfo.scale = MODEL_SCALE;
574 
575  walkmonster_start(self);
576 }
gi
game_import_t gi
Definition: g_main.c:23
FRAME_death211
#define FRAME_death211
Definition: m_actor.h:43
FRAME_death201
#define FRAME_death201
Definition: m_actor.h:33
deathmatch
cvar_t * deathmatch
Definition: g_main.c:33
sound_gunshot
static int sound_gunshot
Definition: m_infantry.c:37
FRAME_duck01
#define FRAME_duck01
Definition: m_brain.h:168
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
m_infantry.h
ThrowGib
void ThrowGib(edict_t *self, char *gibname, int damage, int type)
Definition: g_misc.c:130
MELEE_DISTANCE
#define MELEE_DISTANCE
Definition: g_local.h:82
FRAME_death309
#define FRAME_death309
Definition: m_actor.h:54
infantry_frames_death3
mframe_t infantry_frames_death3[]
Definition: m_infantry.c:351
ai_charge
void ai_charge(edict_t *self, float dist)
Definition: g_ai.c:175
infantry_die
void infantry_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
Definition: m_infantry.c:365
sound_pain1
static int sound_pain1
Definition: m_infantry.c:32
infantry_frames_attack2
mframe_t infantry_frames_attack2[]
Definition: m_infantry.c:503
FRAMETIME
#define FRAMETIME
Definition: g_local.h:75
FRAME_stand01
#define FRAME_stand01
Definition: m_boss31.h:134
infantry_move_stand
mmove_t infantry_move_stand
Definition: m_infantry.c:70
infantry_move_pain1
mmove_t infantry_move_pain1
Definition: m_infantry.c:191
FRAME_death101
#define FRAME_death101
Definition: m_actor.h:26
infantry_cock_gun
void infantry_cock_gun(edict_t *self)
Definition: m_infantry.c:450
AI_STAND_GROUND
#define AI_STAND_GROUND
Definition: g_local.h:126
infantry_frames_duck
mframe_t infantry_frames_duck[]
Definition: m_infantry.c:429
FRAME_run01
#define FRAME_run01
Definition: m_actor.h:114
sound_die2
static int sound_die2
Definition: m_infantry.c:35
infantry_duck_up
void infantry_duck_up(edict_t *self)
Definition: m_infantry.c:421
infantry_move_death1
mmove_t infantry_move_death1
Definition: m_infantry.c:319
infantry_frames_pain1
mframe_t infantry_frames_pain1[]
Definition: m_infantry.c:179
InfantryMachineGun
void InfantryMachineGun(edict_t *self)
Definition: m_infantry.c:248
MODEL_SCALE
#define MODEL_SCALE
Definition: m_actor.h:504
sound_punch_swing
static int sound_punch_swing
Definition: m_infantry.c:39
sound_pain2
static int sound_pain2
Definition: m_infantry.c:33
DAMAGE_YES
@ DAMAGE_YES
Definition: g_local.h:88
infantry_frames_walk
mframe_t infantry_frames_walk[]
Definition: m_infantry.c:137
infantry_duck_hold
void infantry_duck_hold(edict_t *self)
Definition: m_infantry.c:413
infantry_fire
void infantry_fire(edict_t *self)
Definition: m_infantry.c:459
infantry_swing
void infantry_swing(edict_t *self)
Definition: m_infantry.c:489
infantry_walk
void infantry_walk(edict_t *self)
Definition: m_infantry.c:153
fire_hit
qboolean fire_hit(edict_t *self, vec3_t aim, int damage, int kick)
Definition: g_weapon.c:59
FRAME_pain110
#define FRAME_pain110
Definition: m_brain.h:119
FRAME_death301
#define FRAME_death301
Definition: m_actor.h:46
other
@ other
Definition: ogg.c:63
sound_weapon_cock
static int sound_weapon_cock
Definition: m_infantry.c:38
FRAME_pain101
#define FRAME_pain101
Definition: m_actor.h:96
walkmonster_start
void walkmonster_start(edict_t *self)
Definition: g_monster.c:630
MOVETYPE_STEP
@ MOVETYPE_STEP
Definition: g_local.h:192
FRAME_attak111
#define FRAME_attak111
Definition: m_boss31.h:32
FRAME_attak115
#define FRAME_attak115
Definition: m_boss31.h:36
FRAME_death120
#define FRAME_death120
Definition: m_infantry.h:166
FRAME_attak201
#define FRAME_attak201
Definition: m_boss31.h:40
infantry_frames_death1
mframe_t infantry_frames_death1[]
Definition: m_infantry.c:297
FRAME_attak208
#define FRAME_attak208
Definition: m_boss31.h:47
FRAME_run08
#define FRAME_run08
Definition: m_actor.h:121
sound_idle
static int sound_idle
Definition: m_infantry.c:43
infantry_frames_attack1
mframe_t infantry_frames_attack1[]
Definition: m_infantry.c:469
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
infantry_dodge
void infantry_dodge(edict_t *self, edict_t *attacker, float eta)
Definition: m_infantry.c:438
FRAME_duck05
#define FRAME_duck05
Definition: m_brain.h:172
infantry_attack
void infantry_attack(edict_t *self)
Definition: m_infantry.c:515
forward
static vec3_t forward
Definition: p_view.c:27
AI_HOLD_FRAME
#define AI_HOLD_FRAME
Definition: g_local.h:133
infantry_move_walk
mmove_t infantry_move_walk
Definition: m_infantry.c:151
mframe_t
Definition: g_local.h:394
infantry_smack
void infantry_smack(edict_t *self)
Definition: m_infantry.c:494
mmove_t
Definition: g_local.h:400
infantry_move_attack1
mmove_t infantry_move_attack1
Definition: m_infantry.c:486
FRAME_walk03
#define FRAME_walk03
Definition: m_actor.h:275
infantry_move_pain2
mmove_t infantry_move_pain2
Definition: m_infantry.c:205
aimangles
vec3_t aimangles[]
Definition: m_infantry.c:233
FRAME_death225
#define FRAME_death225
Definition: m_boss32.h:297
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
SP_monster_infantry
void SP_monster_infantry(edict_t *self)
Definition: m_infantry.c:526
infantry_frames_run
mframe_t infantry_frames_run[]
Definition: m_infantry.c:158
FRAME_stand50
#define FRAME_stand50
Definition: m_boss2.h:42
infantry_duck_down
void infantry_duck_down(edict_t *self)
Definition: m_infantry.c:402
sound_search
static int sound_search
Definition: m_infantry.c:42
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
infantry_pain
void infantry_pain(edict_t *self, edict_t *other, float kick, int damage)
Definition: m_infantry.c:207
skill
cvar_t * skill
Definition: g_main.c:36
FRAME_stand49
#define FRAME_stand49
Definition: m_boss2.h:41
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
infantry_frames_pain2
mframe_t infantry_frames_pain2[]
Definition: m_infantry.c:193
RANGE_MELEE
#define RANGE_MELEE
Definition: g_local.h:116
infantry_move_fidget
mmove_t infantry_move_fidget
Definition: m_infantry.c:129
DAMAGE_AIM
@ DAMAGE_AIM
Definition: g_local.h:89
sound_die1
static int sound_die1
Definition: m_infantry.c:34
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
GIB_ORGANIC
#define GIB_ORGANIC
Definition: g_local.h:122
level
level_locals_t level
Definition: g_main.c:22
M_FlyCheck
void M_FlyCheck(edict_t *self)
Definition: g_monster.c:121
FRAME_pain210
#define FRAME_pain210
Definition: m_hover.h:172
monster_flash_offset
const vec3_t monster_flash_offset[256]
Definition: m_flash.c:25
FRAME_walk14
#define FRAME_walk14
Definition: m_boss2.h:85
infantry_dead
void infantry_dead(edict_t *self)
Definition: m_infantry.c:286
ThrowHead
void ThrowHead(edict_t *self, char *gibname, int damage, int type)
Definition: g_misc.c:175
infantry_stand
void infantry_stand(edict_t *self)
Definition: m_infantry.c:72
infantry_run
void infantry_run(edict_t *self)
Definition: m_infantry.c:170
infantry_move_death2
mmove_t infantry_move_death2
Definition: m_infantry.c:349
FRAME_pain201
#define FRAME_pain201
Definition: m_actor.h:99
MOVETYPE_TOSS
@ MOVETYPE_TOSS
Definition: g_local.h:194
range
int range(edict_t *self, edict_t *other)
Definition: g_ai.c:245
FRAME_stand71
#define FRAME_stand71
Definition: m_infantry.h:93
infantry_sight
void infantry_sight(edict_t *self, edict_t *other)
Definition: m_infantry.c:281
infantry_move_death3
mmove_t infantry_move_death3
Definition: m_infantry.c:362
infantry_move_duck
mmove_t infantry_move_duck
Definition: m_infantry.c:436
infantry_move_run
mmove_t infantry_move_run
Definition: m_infantry.c:168
infantry_move_attack2
mmove_t infantry_move_attack2
Definition: m_infantry.c:513
AI_DUCKED
#define AI_DUCKED
Definition: g_local.h:137
sound_sight
static int sound_sight
Definition: m_infantry.c:41
infantry_frames_fidget
mframe_t infantry_frames_fidget[]
Definition: m_infantry.c:78
infantry_frames_stand
mframe_t infantry_frames_stand[]
Definition: m_infantry.c:46
VectorNormalize
vec_t VectorNormalize(vec3_t v)
Definition: shared.c:55
ai_stand
void ai_stand(edict_t *self, float dist)
Definition: g_ai.c:100
sound_punch_hit
static int sound_punch_hit
Definition: m_infantry.c:40
FRAME_attak101
#define FRAME_attak101
Definition: m_boss31.h:22
infantry_frames_death2
mframe_t infantry_frames_death2[]
Definition: m_infantry.c:322
infantry_fidget
void infantry_fidget(edict_t *self)
Definition: m_infantry.c:131
g_local.h