Quake II RTX doxygen
1.0 dev
|
|
Go to the documentation of this file.
212 if (self->enemy && self->enemy->client)
274 if (self->health < (self->max_health / 2))
275 self->s.skinnum |= 1;
280 if (
level.
time < self->pain_debounce_time)
288 if (
skill->value >= 2) {
295 self->pain_debounce_time =
level.
time + 3;
296 gi.sound(
self, CHAN_VOICE,
sound_pain, 1, ATTN_NORM, 0);
298 if (
skill->value == 3)
303 else if (damage <= 60)
323 flash_number = MZ2_TANK_BLASTER_1;
325 flash_number = MZ2_TANK_BLASTER_2;
327 flash_number = MZ2_TANK_BLASTER_3;
332 VectorCopy(self->enemy->s.origin, end);
333 end[2] +=
self->enemy->viewheight;
334 VectorSubtract(end, start, dir);
353 flash_number = MZ2_TANK_ROCKET_1;
355 flash_number = MZ2_TANK_ROCKET_2;
357 flash_number = MZ2_TANK_ROCKET_3;
362 VectorCopy(self->enemy->s.origin, vec);
363 vec[2] +=
self->enemy->viewheight;
364 VectorSubtract(vec, start, dir);
378 flash_number = MZ2_TANK_MACHINEGUN_1 + (
self->s.frame -
FRAME_attak406);
384 VectorCopy(self->enemy->s.origin, vec);
385 vec[2] +=
self->enemy->viewheight;
386 VectorSubtract(vec, start, vec);
393 dir[1] =
self->s.angles[1] - 8 * (
self->s.frame -
FRAME_attak411);
395 dir[1] =
self->s.angles[1] + 8 * (
self->s.frame -
FRAME_attak419);
446 if (
skill->value >= 2)
447 if (
visible(
self, self->enemy))
448 if (self->enemy->health > 0)
610 if (
skill->value >= 2)
611 if (self->enemy->health > 0)
612 if (
visible(
self, self->enemy))
631 if (self->enemy->health < 0) {
637 VectorSubtract(self->enemy->s.origin, self->s.origin, vec);
638 range = VectorLength(vec);
647 }
else if (
range <= 250) {
657 self->pain_debounce_time =
level.
time + 5.0;
670 VectorSet(self->mins, -16, -16, -16);
671 VectorSet(self->maxs, 16, 16, -0);
673 self->svflags |= SVF_DEADMONSTER;
714 void tank_die(edict_t *
self, edict_t *inflictor, edict_t *attacker,
int damage, vec3_t point)
719 if (self->health <= self->gib_health) {
720 gi.sound(
self, CHAN_VOICE,
gi.soundindex(
"misc/udeath.wav"), 1, ATTN_NORM, 0);
721 for (n = 0; n < 1 ; n++)
723 for (n = 0; n < 4; n++)
735 gi.sound(
self, CHAN_VOICE,
sound_die, 1, ATTN_NORM, 0);
759 self->s.modelindex =
gi.modelindex(
"models/monsters/tank/tris.md2");
760 VectorSet(self->mins, -32, -32, -16);
761 VectorSet(self->maxs, 32, 32, 72);
763 self->solid = SOLID_BBOX;
774 gi.soundindex(
"tank/tnkatck1.wav");
775 gi.soundindex(
"tank/tnkatk2a.wav");
776 gi.soundindex(
"tank/tnkatk2b.wav");
777 gi.soundindex(
"tank/tnkatk2c.wav");
778 gi.soundindex(
"tank/tnkatk2d.wav");
779 gi.soundindex(
"tank/tnkatk2e.wav");
780 gi.soundindex(
"tank/tnkatck3.wav");
782 if (strcmp(self->classname,
"monster_tank_commander") == 0) {
784 self->gib_health = -225;
787 self->gib_health = -200;
797 self->monsterinfo.dodge = NULL;
799 self->monsterinfo.melee = NULL;
810 if (strcmp(self->classname,
"monster_tank_commander") == 0)
void tank_windup(edict_t *self)
void tank_die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
void G_ProjectSource(const vec3_t point, const vec3_t distance, const vec3_t forward, const vec3_t right, vec3_t result)
mmove_t tank_move_reattack_blast
mframe_t tank_frames_stop_run[]
void tank_idle(edict_t *self)
#define DEFAULT_BULLET_HSPREAD
void ThrowGib(edict_t *self, char *gibname, int damage, int type)
void tank_stand(edict_t *self)
void ai_charge(edict_t *self, float dist)
mframe_t tank_frames_attack_pre_rocket[]
mmove_t tank_move_stop_walk
mmove_t tank_move_stop_run
void tank_poststrike(edict_t *self)
void tank_thud(edict_t *self)
mmove_t tank_move_start_walk
mframe_t tank_frames_death1[]
mframe_t tank_frames_run[]
void walkmonster_start(edict_t *self)
mmove_t tank_move_attack_blast
mframe_t tank_frames_start_walk[]
void vectoangles(vec3_t vec, vec3_t angles)
#define DEFAULT_BULLET_VSPREAD
void G_FreeEdict(edict_t *e)
void TankRocket(edict_t *self)
mframe_t tank_frames_attack_blast[]
mframe_t tank_frames_reattack_blast[]
void TankMachineGun(edict_t *self)
void tank_doattack_rocket(edict_t *self)
mframe_t tank_frames_stop_walk[]
void tank_footstep(edict_t *self)
void SP_monster_tank(edict_t *self)
mframe_t tank_frames_attack_post_rocket[]
void ai_walk(edict_t *self, float dist)
void AngleVectors(vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
mframe_t tank_frames_attack_post_blast[]
void tank_walk(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)
mframe_t tank_frames_stand[]
void monster_fire_rocket(edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, int flashtype)
mmove_t tank_move_attack_post_rocket
void tank_run(edict_t *self)
void ai_move(edict_t *self, float dist)
mframe_t tank_frames_attack_fire_rocket[]
void monster_fire_blaster(edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, int flashtype, int effect)
mmove_t tank_move_attack_pre_rocket
mframe_t tank_frames_start_run[]
qboolean visible(edict_t *self, edict_t *other)
mmove_t tank_move_attack_chain
mmove_t tank_move_attack_strike
void ai_run(edict_t *self, float dist)
mframe_t tank_frames_pain1[]
mframe_t tank_frames_pain3[]
mframe_t tank_frames_attack_strike[]
void tank_pain(edict_t *self, edict_t *other, float kick, int damage)
void tank_attack(edict_t *self)
const vec3_t monster_flash_offset[256]
void ThrowHead(edict_t *self, char *gibname, int damage, int type)
void tank_sight(edict_t *self, edict_t *other)
void tank_refire_rocket(edict_t *self)
void TankStrike(edict_t *self)
int range(edict_t *self, edict_t *other)
void tank_dead(edict_t *self)
mframe_t tank_frames_pain2[]
mmove_t tank_move_attack_post_blast
mmove_t tank_move_start_run
void tank_reattack_blaster(edict_t *self)
mframe_t tank_frames_attack_chain[]
mframe_t tank_frames_walk[]
vec_t VectorNormalize(vec3_t v)
void TankBlaster(edict_t *self)
void ai_stand(edict_t *self, float dist)
mmove_t tank_move_attack_fire_rocket