Quake II RTX doxygen
1.0 dev
|
|
Go to the documentation of this file.
51 gi.sound(
self, CHAN_WEAPON,
sound_cock, 1, ATTN_IDLE, 0);
53 gi.sound(
self, CHAN_WEAPON,
sound_cock, 1, ATTN_NORM, 0);
144 mframe_t soldier_frames_stand4 [] = {
203 mmove_t soldier_move_stand4 = {FRAME_stand401, FRAME_stand452, soldier_frames_stand4, NULL};
397 if (self->health < (self->max_health / 2))
398 self->s.skinnum |= 1;
400 if (
level.
time < self->pain_debounce_time) {
406 self->pain_debounce_time =
level.
time + 3;
408 n =
self->s.skinnum | 1;
412 gi.sound(
self, CHAN_VOICE,
sound_pain, 1, ATTN_NORM, 0);
416 if (self->velocity[2] > 100) {
421 if (
skill->value == 3)
439 static int blaster_flash [] = {MZ2_SOLDIER_BLASTER_1, MZ2_SOLDIER_BLASTER_2, MZ2_SOLDIER_BLASTER_3, MZ2_SOLDIER_BLASTER_4, MZ2_SOLDIER_BLASTER_5, MZ2_SOLDIER_BLASTER_6, MZ2_SOLDIER_BLASTER_7, MZ2_SOLDIER_BLASTER_8};
440 static int shotgun_flash [] = {MZ2_SOLDIER_SHOTGUN_1, MZ2_SOLDIER_SHOTGUN_2, MZ2_SOLDIER_SHOTGUN_3, MZ2_SOLDIER_SHOTGUN_4, MZ2_SOLDIER_SHOTGUN_5, MZ2_SOLDIER_SHOTGUN_6, MZ2_SOLDIER_SHOTGUN_7, MZ2_SOLDIER_SHOTGUN_8};
441 static int machinegun_flash [] = {MZ2_SOLDIER_MACHINEGUN_1, MZ2_SOLDIER_MACHINEGUN_2, MZ2_SOLDIER_MACHINEGUN_3, MZ2_SOLDIER_MACHINEGUN_4, MZ2_SOLDIER_MACHINEGUN_5, MZ2_SOLDIER_MACHINEGUN_6, MZ2_SOLDIER_MACHINEGUN_7, MZ2_SOLDIER_MACHINEGUN_8};
453 if (self->s.skinnum < 2)
455 else if (self->s.skinnum < 4)
463 if (flash_number == 5 || flash_number == 6) {
466 VectorCopy(self->enemy->s.origin, end);
467 end[2] +=
self->enemy->viewheight;
468 VectorSubtract(end, start, aim);
474 VectorMA(start, 8192,
forward, end);
475 VectorMA(end, r,
right, end);
476 VectorMA(end, u,
up, end);
478 VectorSubtract(end, start, aim);
482 if (self->s.skinnum <= 1) {
484 }
else if (self->s.skinnum <= 3) {
492 if (
level.
time >= self->monsterinfo.pausetime)
508 if (self->s.skinnum > 1)
511 if (self->enemy->health <= 0)
522 if (self->s.skinnum < 2)
525 if (self->enemy->health <= 0)
557 if (self->s.skinnum > 1)
560 if (self->enemy->health <= 0)
571 if (self->s.skinnum < 2)
574 if (self->enemy->health <= 0)
607 if (self->monsterinfo.aiflags &
AI_DUCKED)
612 self->monsterinfo.pausetime =
level.
time + 1;
632 if ((
level.
time + 0.4) < self->monsterinfo.pausetime)
675 void soldier_fire5(edict_t *
self)
680 void soldier_attack5_refire(edict_t *
self)
682 if (self->enemy->health <= 0)
689 mframe_t soldier_frames_attack5 [] = {
711 if (self->enemy->health <= 0)
717 if (
skill->value == 3)
741 if (self->s.skinnum < 4) {
775 if (
level.
time >= self->monsterinfo.pausetime)
799 self->enemy = attacker;
801 if (
skill->value == 0) {
806 self->monsterinfo.pausetime =
level.
time + eta + 0.3;
809 if (
skill->value == 1) {
817 if (
skill->value >= 2) {
845 VectorSet(self->mins, -16, -16, -24);
846 VectorSet(self->maxs, 16, 16, -8);
848 self->svflags |= SVF_DEADMONSTER;
1097 void soldier_die(edict_t *
self, edict_t *inflictor, edict_t *attacker,
int damage, vec3_t point)
1102 if (self->health <= self->gib_health) {
1103 gi.sound(
self, CHAN_VOICE,
gi.soundindex(
"misc/udeath.wav"), 1, ATTN_NORM, 0);
1104 for (n = 0; n < 3; n++)
1118 self->s.skinnum |= 1;
1120 if (self->s.skinnum == 1)
1122 else if (self->s.skinnum == 3)
1127 if (fabs((self->s.origin[2] + self->viewheight) - point[2]) <= 4) {
1154 self->s.modelindex =
gi.modelindex(
"models/monsters/soldier/tris.md2");
1156 VectorSet(self->mins, -16, -16, -24);
1157 VectorSet(self->maxs, 16, 16, 32);
1159 self->solid = SOLID_BBOX;
1176 self->monsterinfo.melee = NULL;
1179 gi.linkentity(
self);
1181 self->monsterinfo.stand(
self);
1200 gi.modelindex(
"models/objects/laser/tris.md2");
1201 gi.soundindex(
"misc/lasfly.wav");
1202 gi.soundindex(
"soldier/solatck2.wav");
1204 self->s.skinnum = 0;
1206 self->gib_health = -30;
1222 gi.soundindex(
"soldier/solatck1.wav");
1224 self->s.skinnum = 2;
1226 self->gib_health = -30;
1242 gi.soundindex(
"soldier/solatck3.wav");
1244 self->s.skinnum = 4;
1246 self->gib_health = -30;
mmove_t soldier_move_pain4
mmove_t soldier_move_pain2
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[]
void G_ProjectSource(const vec3_t point, const vec3_t distance, const vec3_t forward, const vec3_t right, vec3_t result)
mframe_t soldier_frames_death6[]
void soldier_fire2(edict_t *self)
void soldier_duck_down(edict_t *self)
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)
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)
void SP_monster_soldier_x(edict_t *self)
mframe_t soldier_frames_pain1[]
mmove_t soldier_move_death2
mframe_t soldier_frames_attack4[]
void soldier_fire7(edict_t *self)
mframe_t soldier_frames_stand3[]
static int sound_death_ss
mframe_t soldier_frames_pain3[]
#define DEFAULT_SHOTGUN_COUNT
void soldier_fire4(edict_t *self)
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 soldier_pain(edict_t *self, edict_t *other, float kick, int damage)
mmove_t soldier_move_attack2
void vectoangles(vec3_t vec, vec3_t angles)
#define DEFAULT_BULLET_VSPREAD
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
void soldier_walk1_random(edict_t *self)
mframe_t soldier_frames_stand1[]
mmove_t soldier_move_death6
void soldier_fire3(edict_t *self)
void ai_walk(edict_t *self, float dist)
void AngleVectors(vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
mframe_t soldier_frames_attack1[]
void soldier_duck_up(edict_t *self)
void soldier_attack2_refire1(edict_t *self)
void soldier_stand(edict_t *self)
void monster_fire_bullet(edict_t *self, vec3_t start, vec3_t dir, int damage, int kick, int hspread, int vspread, int flashtype)
void soldier_run(edict_t *self)
mframe_t soldier_frames_death2[]
mmove_t soldier_move_death1
mframe_t soldier_frames_death5[]
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)
mframe_t soldier_frames_death1[]
#define DEFAULT_SHOTGUN_HSPREAD
void ai_run(edict_t *self, float dist)
mmove_t soldier_move_attack6
#define DEFAULT_SHOTGUN_VSPREAD
mmove_t soldier_move_death4
void soldier_attack1_refire1(edict_t *self)
const vec3_t monster_flash_offset[256]
void soldier_attack1_refire2(edict_t *self)
void ThrowHead(edict_t *self, char *gibname, int damage, int type)
void soldier_fire1(edict_t *self)
void soldier_fire8(edict_t *self)
void soldier_attack(edict_t *self)
int range(edict_t *self, edict_t *other)
mframe_t soldier_frames_duck[]
void soldier_walk(edict_t *self)
mmove_t soldier_move_death5
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)
void soldier_fire(edict_t *self, int flash_number)
mframe_t soldier_frames_death3[]
mframe_t soldier_frames_attack6[]
void soldier_duck_hold(edict_t *self)
static int sound_pain_light
vec_t VectorNormalize(vec3_t v)
mmove_t soldier_move_stand1
mmove_t soldier_move_walk2
void ai_stand(edict_t *self, float dist)
void soldier_fire6(edict_t *self)
void soldier_dead(edict_t *self)
mframe_t soldier_frames_pain2[]