Go to the documentation of this file.
208 mmove_t soldier_move_stand4 = {FRAME_stand401, FRAME_stand452, soldier_frames_stand4,
NULL};
414 if (self->health < (self->max_health / 2))
415 self->s.skinnum |= 1;
417 if (
level.time < self->pain_debounce_time)
424 self->pain_debounce_time =
level.time + 3;
426 n =
self->s.skinnum | 1;
434 if (self->velocity[2] > 100)
472 if (self->s.skinnum < 2)
474 else if (self->s.skinnum < 4)
482 if (flash_number == 5 || flash_number == 6)
489 end[2] +=
self->enemy->viewheight;
504 if (self->s.skinnum <= 1)
508 else if (self->s.skinnum <= 3)
515 self->monsterinfo.pausetime =
level.time + (3 + rand() % 8) *
FRAMETIME;
519 if (
level.time >= self->monsterinfo.pausetime)
535 if (self->s.skinnum > 1)
538 if (self->enemy->health <= 0)
549 if (self->s.skinnum < 2)
552 if (self->enemy->health <= 0)
585 if (self->s.skinnum > 1)
588 if (self->enemy->health <= 0)
599 if (self->s.skinnum < 2)
602 if (self->enemy->health <= 0)
636 if (self->monsterinfo.aiflags &
AI_DUCKED)
641 self->monsterinfo.pausetime =
level.time + 1;
661 if ((
level.time + 0.4) < self->monsterinfo.pausetime)
706 void soldier_fire5 (
edict_t *
self)
711 void soldier_attack5_refire (
edict_t *
self)
713 if (self->enemy->health <= 0)
720 mframe_t soldier_frames_attack5 [] =
743 if (self->enemy->health <= 0)
774 if (self->s.skinnum < 4)
812 if (
level.time >= self->monsterinfo.pausetime)
837 self->enemy = attacker;
845 self->monsterinfo.pausetime =
level.time + eta + 0.3;
1149 if (self->health <= self->gib_health)
1152 for (n= 0; n < 3; n++)
1166 self->s.skinnum |= 1;
1168 if (self->s.skinnum == 1)
1170 else if (self->s.skinnum == 3)
1175 if (fabs((self->s.origin[2] + self->viewheight) - point[2]) <= 4)
1203 self->s.modelindex =
gi.
modelindex (
"models/monsters/soldier/tris.md2");
1225 self->monsterinfo.melee =
NULL;
1230 self->monsterinfo.stand (
self);
1254 self->s.skinnum = 0;
1256 self->gib_health = -30;
1275 self->s.skinnum = 2;
1277 self->gib_health = -30;
1296 self->s.skinnum = 4;
1298 self->gib_health = -30;
mmove_t soldier_move_pain4
mmove_t soldier_move_pain2
void G_ProjectSource(vec3_t point, vec3_t distance, vec3_t forward, vec3_t right, vec3_t result)
void SP_monster_soldier_light(edict_t *self)
mmove_t soldier_move_attack4
void SP_monster_soldier_ss(edict_t *self)
mframe_t soldier_frames_start_run[]
mframe_t soldier_frames_death6[]
void soldier_fire2(edict_t *self)
void soldier_duck_down(edict_t *self)
#define MZ2_SOLDIER_SHOTGUN_4
void soldier_idle(edict_t *self)
static int shotgun_flash[]
static int blaster_flash[]
#define DEFAULT_BULLET_HSPREAD
void ThrowGib(edict_t *self, char *gibname, int damage, int type)
#define VectorSubtract(a, b, c)
#define MZ2_SOLDIER_MACHINEGUN_3
void ai_charge(edict_t *self, float dist)
mmove_t soldier_move_pain1
mframe_t soldier_frames_death4[]
void soldier_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
void soldier_attack3_refire(edict_t *self)
mmove_t soldier_move_pain3
static int machinegun_flash[]
void soldier_attack2_refire2(edict_t *self)
#define MZ2_SOLDIER_BLASTER_5
void SP_monster_soldier_x(edict_t *self)
mframe_t soldier_frames_pain1[]
mmove_t soldier_move_death2
#define MZ2_SOLDIER_MACHINEGUN_6
#define MZ2_SOLDIER_SHOTGUN_8
#define MZ2_SOLDIER_MACHINEGUN_1
mframe_t soldier_frames_attack4[]
void soldier_fire7(edict_t *self)
mframe_t soldier_frames_stand3[]
#define MZ2_SOLDIER_SHOTGUN_6
static int sound_death_ss
void(* sound)(edict_t *ent, int channel, int soundindex, float volume, float attenuation, float timeofs)
mframe_t soldier_frames_pain3[]
#define DEFAULT_SHOTGUN_COUNT
void soldier_fire4(edict_t *self)
#define MZ2_SOLDIER_MACHINEGUN_7
#define MZ2_SOLDIER_SHOTGUN_1
mmove_t soldier_move_death3
void soldier_sight(edict_t *self, edict_t *other)
mframe_t soldier_frames_run[]
void walkmonster_start(edict_t *self)
void soldier_attack6_refire(edict_t *self)
mmove_t soldier_move_attack3
mmove_t soldier_move_walk1
mframe_t soldier_frames_walk1[]
mframe_t soldier_frames_pain4[]
void AngleVectors(vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
void soldier_pain(edict_t *self, edict_t *other, float kick, int damage)
mmove_t soldier_move_attack2
vec3_t monster_flash_offset[]
void vectoangles(vec3_t vec, vec3_t angles)
#define DEFAULT_BULLET_VSPREAD
#define MZ2_SOLDIER_SHOTGUN_3
void soldier_cock(edict_t *self)
void G_FreeEdict(edict_t *e)
mmove_t soldier_move_attack1
mmove_t soldier_move_start_run
static int sound_death_light
mframe_t soldier_frames_attack2[]
mmove_t soldier_move_duck
int(* soundindex)(char *name)
void soldier_walk1_random(edict_t *self)
mframe_t soldier_frames_stand1[]
int(* modelindex)(char *name)
mmove_t soldier_move_death6
void soldier_fire3(edict_t *self)
#define MZ2_SOLDIER_BLASTER_8
void ai_walk(edict_t *self, float dist)
vec_t VectorNormalize(vec3_t v)
mframe_t soldier_frames_attack1[]
#define MZ2_SOLDIER_SHOTGUN_7
void soldier_duck_up(edict_t *self)
void soldier_attack2_refire1(edict_t *self)
void soldier_stand(edict_t *self)
#define MZ2_SOLDIER_BLASTER_6
void monster_fire_bullet(edict_t *self, vec3_t start, vec3_t dir, int damage, int kick, int hspread, int vspread, int flashtype)
#define MZ2_SOLDIER_BLASTER_4
void soldier_run(edict_t *self)
mframe_t soldier_frames_death2[]
mmove_t soldier_move_death1
#define MZ2_SOLDIER_BLASTER_7
#define MZ2_SOLDIER_BLASTER_3
mframe_t soldier_frames_death5[]
#define MZ2_SOLDIER_BLASTER_1
void ai_move(edict_t *self, float dist)
mmove_t soldier_move_stand3
void monster_fire_blaster(edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, int flashtype, int effect)
#define MZ2_SOLDIER_MACHINEGUN_8
monsterinfo_t monsterinfo
mframe_t soldier_frames_death1[]
#define DEFAULT_SHOTGUN_HSPREAD
void ai_run(edict_t *self, float dist)
mmove_t soldier_move_attack6
void VectorMA(vec3_t veca, float scale, vec3_t vecb, vec3_t vecc)
#define DEFAULT_SHOTGUN_VSPREAD
mmove_t soldier_move_death4
void soldier_attack1_refire1(edict_t *self)
void soldier_attack1_refire2(edict_t *self)
void ThrowHead(edict_t *self, char *gibname, int damage, int type)
#define MZ2_SOLDIER_BLASTER_2
void soldier_fire1(edict_t *self)
void soldier_fire8(edict_t *self)
void soldier_attack(edict_t *self)
#define VectorSet(v, x, y, z)
mframe_t soldier_frames_duck[]
void soldier_walk(edict_t *self)
mmove_t soldier_move_death5
void(* linkentity)(edict_t *ent)
void soldier_dodge(edict_t *self, edict_t *attacker, float eta)
mframe_t soldier_frames_walk2[]
void monster_fire_shotgun(edict_t *self, vec3_t start, vec3_t aimdir, int damage, int kick, int hspread, int vspread, int count, int flashtype)
mframe_t soldier_frames_attack3[]
void SP_monster_soldier(edict_t *self)
#define MZ2_SOLDIER_MACHINEGUN_4
void soldier_fire(edict_t *self, int flash_number)
mframe_t soldier_frames_death3[]
mframe_t soldier_frames_attack6[]
#define MZ2_SOLDIER_SHOTGUN_2
void soldier_duck_hold(edict_t *self)
static int sound_pain_light
#define MZ2_SOLDIER_SHOTGUN_5
mmove_t soldier_move_stand1
mmove_t soldier_move_walk2
#define MZ2_SOLDIER_MACHINEGUN_2
void ai_stand(edict_t *self, float dist)
void soldier_fire6(edict_t *self)
void soldier_dead(edict_t *self)
#define MZ2_SOLDIER_MACHINEGUN_5
mframe_t soldier_frames_pain2[]