void widow_attack_kick (edict_t *self) { vec3_t aim; VectorSet (aim, 100, 0, 4); if (self->enemy->groundentity) fire_hit (self, aim, (50 + (rand() % 6)), 500); else // not as much kick if they're in the air .. makes it harder to land on her head fire_hit (self, aim, (50 + (rand() % 6)), 250); }
void brain_hit_left(edict_t *self){ vec3_t aim; VectorSet(aim, MELEE_DISTANCE, self->mins[0], 8); if(fire_hit(self, aim,(15 +(rand() % 5)), 40)) gi.sound(self, CHAN_WEAPON, sound_melee3, 1, ATTN_NORM, 0); }
void flipper_bite (edict_t *self) { vec3_t aim; VectorSet (aim, MELEE_DISTANCE, 0, 0); fire_hit (self, aim, 5, 0); }
/* ----------------------------------------------------------------------------- Function: Parameters: Returns: Notes: ----------------------------------------------------------------------------- */ PRIVATE void PL_PlayerAttack( player_t *self, _boolean re_attack ) { struct atkinf *cur; self->attackcount -= tics; while( self->attackcount <= 0 ) { cur = &attackinfo[ self->weapon ][ self->attackframe ]; switch( cur->attack ) { case -1: self->flags &= ~PL_FLAG_ATTCK; if( ! self->ammo[ AMMO_BULLETS ] ) { self->weapon = WEAPON_KNIFE; } else if( self->weapon != self->pendingweapon ) { self->weapon = self->pendingweapon; } self->attackframe = self->weaponframe = 0; return; case 4: if( ! self->ammo[ AMMO_BULLETS ] ) { break; } if( re_attack ) { self->attackframe -= 2; } case 1: if( ! self->ammo[ AMMO_BULLETS ] ) // can only happen with chain gun { self->attackframe++; break; } fire_lead( self ); self->ammo[ AMMO_BULLETS ]--; break; case 2: fire_hit( self ); break; case 3: if(self->ammo[AMMO_BULLETS] && re_attack) self->attackframe-=2; break; } self->attackcount += cur->tics; self->attackframe++; self->weaponframe = attackinfo[ self->weapon ][ self->attackframe ].frame; } }
void flyer_slash_right(edict_t *self) { vec3_t aim; VectorSet(aim, MELEE_DISTANCE, self->maxs[0], 0); fire_hit(self, aim, 5, 0); gi.sound(self, CHAN_WEAPON, sound_slash, 1, ATTN_NORM, 0); }
void berserk_attack_club (edict_t *self) { vec3_t aim; VectorSet (aim, MELEE_DISTANCE, self->mins[0], -4); fire_hit (self, aim, (5 + (rand() % 6)), 400); // Slower attack }
void brain_tentacle_attack(edict_t *self){ vec3_t aim; VectorSet(aim, MELEE_DISTANCE, 0, 8); if(fire_hit(self, aim,(10 +(rand() % 5)), -600) && skill->value > 0) self->spawnflags |= 65536; gi.sound(self, CHAN_WEAPON, sound_tentacles_retract, 1, ATTN_NORM, 0); }
void floater_wham(edict_t *self) { static vec3_t aim = {MELEE_DISTANCE, 0, 0}; gi.sound(self, CHAN_WEAPON, sound_attack3, 1, ATTN_NORM, 0); fire_hit(self, aim, 5 + rand() % 6, -50); }
void ChickSlash(edict_t *self) { vec3_t aim; VectorSet(aim, MELEE_DISTANCE, self->mins[0], 10); gi.sound(self, CHAN_WEAPON, sound_melee_swing, 1, ATTN_NORM, 0); fire_hit(self, aim, (10 + (Q_rand() % 6)), 100); }
void infantry_smack (edict_t *self) { vec3_t aim; VectorSet (aim, MELEE_DISTANCE, 0, 0); if (fire_hit (self, aim, (5 + (rand() % 5)), 50)) gi.sound (self, CHAN_WEAPON, sound_punch_hit, 1, ATTN_NORM, 0); }
void GaldiatorMelee (edict_t *self) { vec3_t aim; VectorSet (aim, MELEE_DISTANCE, self->mins[0], -4); if (fire_hit (self, aim, (20 + (rand() %5)), 300)) gi.sound (self, CHAN_AUTO, sound_cleaver_hit, 1, ATTN_NORM, 0); else gi.sound (self, CHAN_AUTO, sound_cleaver_miss, 1, ATTN_NORM, 0); }
void mutant_hit_right (edict_t *self) { vec3_t aim; VectorSet (aim, MELEE_DISTANCE, self->maxs[0], 8); if (fire_hit (self, aim, (10 + (rand() %5)), 100)) gi.sound (self, CHAN_WEAPON, sound_hit2, 1, ATTN_NORM, 0); else gi.sound (self, CHAN_WEAPON, sound_swing, 1, ATTN_NORM, 0); }
void gekk_hit_left (edict_t *self) { vec3_t aim; VectorSet (aim, MELEE_DISTANCE, self->mins[0], 8); if (fire_hit (self, aim, (15 + (rand() %5)), 100)) gi.sound (self, CHAN_WEAPON, sound_hit, 1, ATTN_NORM, 0); else gi.sound (self, CHAN_WEAPON, sound_swing, 1, ATTN_NORM, 0); }
void stalker_swing_attack (edict_t *self) { vec3_t aim; VectorSet (aim, MELEE_DISTANCE, 0, 0); if (fire_hit (self, aim, (5 + (rand() % 5)), 50)) if (self->s.frame < FRAME_attack08) gi.sound (self, CHAN_WEAPON, sound_punch_hit2, 1, ATTN_NORM, 0); else gi.sound (self, CHAN_WEAPON, sound_punch_hit1, 1, ATTN_NORM, 0); }
void berserk_attack_spike (edict_t *self) { static vec3_t aim = {MELEE_DISTANCE, 0, -24}; if (!self) { return; } fire_hit (self, aim, (15 + (rand() % 6)), 400); // Faster attack -- upwards and backwards }
void gekk_bite(edict_t *self) { vec3_t aim; if (!self) { return; } VectorSet(aim, MELEE_DISTANCE, 0, 0); fire_hit(self, aim, 5, 0); }
void ChickSlash (edict_t *self) { vec3_t aim; int damage; if (self->radius_dmg) damage = (100 + 12 * self->monsterinfo.skill); else damage = (50 + 6 * self->monsterinfo.skill); VectorSet (aim, MELEE_DISTANCE, self->mins[0], 10); if (!self->radius_dmg || !(self->monsterinfo.ability & GIEX_MABILITY_SILENCED)) { gi.sound (self, CHAN_WEAPON, sound_melee_swing, 1, ATTN_NORM, 0); } fire_hit (self, aim, damage, 100); }
void flyer_slash_left(edict_t *self) { vec3_t aim; if (!self) { return; } VectorSet(aim, MELEE_DISTANCE, self->mins[0], 0); fire_hit(self, aim, 5, 0); gi.sound(self, CHAN_WEAPON, sound_slash, 1, ATTN_NORM, 0); }
void Widow2Crunch(edict_t *self) { vec3_t aim; if (!self) { return; } if ((!self->enemy) || (!self->enemy->inuse)) { self->monsterinfo.run(self); return; } Widow2TonguePull(self); /* 70 + 32 */ VectorSet(aim, 150, 0, 4); if (self->s.frame != FRAME_tongs07) { fire_hit(self, aim, 20 + (rand() % 6), 0); } else { if (self->enemy->groundentity) { fire_hit(self, aim, (20 + (rand() % 6)), 500); } else /* not as much kick if they're in the air .. makes it harder to land on her head */ { fire_hit(self, aim, (20 + (rand() % 6)), 250); } } }
void myChickSlash (edict_t *self) { vec3_t aim; if (self->monsterinfo.bonus_flags & BF_UNIQUE_FIRE) { myChickMeteor(self); return; } if (!G_EntExists(self->enemy)) return; VectorSet (aim, MELEE_DISTANCE, self->mins[0], 10); gi.sound (self, CHAN_WEAPON, sound_melee_swing, 1, ATTN_NORM, 0); fire_hit (self, aim, (10 + (rand() %6)), 100); }
void brain_hit_right(edict_t *self) { vec3_t aim; if (!self) { return; } VectorSet(aim, MELEE_DISTANCE, self->maxs[0], 8); if (fire_hit(self, aim, (15 + (rand() % 5)), 40)) { gi.sound(self, CHAN_WEAPON, sound_melee3, 1, ATTN_NORM, 0); } }
void GaldiatorMelee (edict_t *self) { vec3_t aim; int damage; if (self->radius_dmg) damage = (80 + 20 * self->monsterinfo.skill); else damage = (40 + 10 * self->monsterinfo.skill); VectorSet (aim, MELEE_DISTANCE, self->mins[0], -4); if (fire_hit (self, aim, damage, 300)) { if (!self->radius_dmg || !(self->monsterinfo.ability & GIEX_MABILITY_SILENCED)) { gi.sound (self, CHAN_AUTO, sound_cleaver_hit, 1, ATTN_NORM, 0); } } else { if (!self->radius_dmg || !(self->monsterinfo.ability & GIEX_MABILITY_SILENCED)) { gi.sound (self, CHAN_AUTO, sound_cleaver_miss, 1, ATTN_NORM, 0); } } }
void GladbMelee(edict_t *self) { vec3_t aim; if (!self) { return; } VectorSet(aim, MELEE_DISTANCE, self->mins[0], -4); if (fire_hit(self, aim, (20 + (rand() % 5)), 300)) { gi.sound(self, CHAN_AUTO, sound_cleaver_hit, 1, ATTN_NORM, 0); } else { gi.sound(self, CHAN_AUTO, sound_cleaver_miss, 1, ATTN_NORM, 0); } }
void gekk_hit_right(edict_t *self) { vec3_t aim; if (!self) { return; } VectorSet(aim, MELEE_DISTANCE, self->maxs[0], 8); if (fire_hit(self, aim, (15 + (rand() % 5)), 100)) { gi.sound(self, CHAN_WEAPON, sound_hit2, 1, ATTN_NORM, 0); } else { gi.sound(self, CHAN_WEAPON, sound_swing, 1, ATTN_NORM, 0); } }
void mutant_hit_left(edict_t *self) { vec3_t aim; if (!self) { return; } VectorSet(aim, MELEE_DISTANCE, self->mins[0], 8); if (fire_hit(self, aim, (10 + (rand() % 5)), 100)) { gi.sound(self, CHAN_WEAPON, sound_hit, 1, ATTN_NORM, 0); } else { gi.sound(self, CHAN_WEAPON, sound_swing, 1, ATTN_NORM, 0); } }
void zboss_swing (edict_t *self) { static vec3_t aim = {MELEE_DISTANCE, 0, -24}; fire_hit (self, aim, (15 + (rand() % 6)), 800); }