void ChickRocket (edict_t *self) { vec3_t forward, right; vec3_t start; vec3_t dir; vec3_t vec; qboolean tone = true; AngleVectors (self->s.angles, forward, right, NULL); G_ProjectSource (self->s.origin, monster_flash_offset[MZ2_CHICK_ROCKET_1], forward, right, start); VectorCopy (self->enemy->s.origin, vec); vec[2] += self->enemy->viewheight; VectorSubtract (vec, start, dir); VectorNormalize (dir); if (self->s.skinnum > 1) monster_fire_heat (self, start, dir, 50, 500, MZ2_CHICK_ROCKET_1); else monster_fire_rocket (self, start, dir, 50, 500, MZ2_CHICK_ROCKET_1); }
void Widow2Beam(edict_t *self) { vec3_t forward, right, target; vec3_t start, targ_angles, vec; int flashnum; if (!self) { return; } if ((!self->enemy) || (!self->enemy->inuse)) { return; } AngleVectors(self->s.angles, forward, right, NULL); if ((self->s.frame >= FRAME_fireb05) && (self->s.frame <= FRAME_fireb09)) { /* regular beam attack */ Widow2SaveBeamTarget(self); flashnum = MZ2_WIDOW2_BEAMER_1 + self->s.frame - FRAME_fireb05; G_ProjectSource(self->s.origin, monster_flash_offset[flashnum], forward, right, start); VectorCopy(self->pos2, target); target[2] += self->enemy->viewheight - 10; VectorSubtract(target, start, forward); VectorNormalize(forward); monster_fire_heat(self, start, forward, vec3_origin, 10, 50, flashnum); } else if ((self->s.frame >= FRAME_spawn04) && (self->s.frame <= FRAME_spawn14)) { /* sweep */ flashnum = MZ2_WIDOW2_BEAM_SWEEP_1 + self->s.frame - FRAME_spawn04; G_ProjectSource(self->s.origin, monster_flash_offset[flashnum], forward, right, start); VectorSubtract(self->enemy->s.origin, start, target); vectoangles2(target, targ_angles); VectorCopy(self->s.angles, vec); vec[PITCH] += targ_angles[PITCH]; vec[YAW] -= sweep_angles[flashnum - MZ2_WIDOW2_BEAM_SWEEP_1]; AngleVectors(vec, forward, NULL, NULL); monster_fire_heat(self, start, forward, vec3_origin, 10, 50, flashnum); } else { Widow2SaveBeamTarget(self); G_ProjectSource(self->s.origin, monster_flash_offset[MZ2_WIDOW2_BEAMER_1], forward, right, start); VectorCopy(self->pos2, target); target[2] += self->enemy->viewheight - 10; VectorSubtract(target, start, forward); VectorNormalize(forward); monster_fire_heat(self, start, forward, vec3_origin, 10, 50, 0); } }
void Widow2Beam (edict_t *self) { vec3_t forward, right, target; vec3_t start, targ_angles, vec; int flashnum; if ((!self->enemy) || (!self->enemy->inuse)) return; AngleVectors (self->s.angles, forward, right, NULL); if ((self->s.frame >= FRAME_fireb05) && (self->s.frame <= FRAME_fireb09)) { // regular beam attack Widow2SaveBeamTarget(self); flashnum = MZ2_WIDOW2_BEAMER_1 + self->s.frame - FRAME_fireb05; G_ProjectSource (self->s.origin, monster_flash_offset[flashnum], forward, right, start); VectorCopy (self->pos2, target); target[2] += self->enemy->viewheight-10; VectorSubtract (target, start, forward); VectorNormalize (forward); monster_fire_heat (self, start, forward, vec3_origin, 10, 50, flashnum); } else if ((self->s.frame >= FRAME_spawn04) && (self->s.frame <= FRAME_spawn14)) { // sweep flashnum = MZ2_WIDOW2_BEAM_SWEEP_1 + self->s.frame - FRAME_spawn04; G_ProjectSource (self->s.origin, monster_flash_offset[flashnum], forward, right, start); VectorSubtract (self->enemy->s.origin, start, target); vectoangles2 (target, targ_angles); VectorCopy (self->s.angles, vec); vec[PITCH] += targ_angles[PITCH]; vec[YAW] -= sweep_angles[flashnum-MZ2_WIDOW2_BEAM_SWEEP_1]; AngleVectors (vec, forward, NULL, NULL); monster_fire_heat (self, start, forward, vec3_origin, 10, 50, flashnum); /* if (self->s.frame == FRAME_spawn04) { VectorMA (start, 1024, forward, debugend); gi.WriteByte (svc_temp_entity); gi.WriteByte (TE_DEBUGTRAIL); gi.WritePosition (start); gi.WritePosition (debugend); gi.multicast (start, MULTICAST_ALL); drawbbox (self); self->monsterinfo.aiflags |= AI_HOLD_FRAME|AI_MANUAL_STEERING; } */ } else { // if ((g_showlogic) && (g_showlogic->value)) // gi.dprintf ("bad fire frame for widow2 beam -- tell me you saw this!\n"); Widow2SaveBeamTarget(self); G_ProjectSource (self->s.origin, monster_flash_offset[MZ2_WIDOW2_BEAMER_1], forward, right, start); VectorCopy (self->pos2, target); target[2] += self->enemy->viewheight-10; VectorSubtract (target, start, forward); VectorNormalize (forward); monster_fire_heat (self, start, forward, vec3_origin, 10, 50, 0); } }