/* =============== FireWeapon2 =============== */ void FireWeapon2( gentity_t *ent ) { if( ent->client ) { // set aiming directions AngleVectors( ent->client->ps.viewangles, forward, right, up ); CalcMuzzlePoint( ent, forward, right, up, muzzle ); } else { AngleVectors( ent->s.angles2, forward, right, up ); VectorCopy( ent->s.pos.trBase, muzzle ); } // fire the specific weapon switch( ent->s.weapon ) { /*case WP_ALEVEL1: //Blaster_ball( ent, 0); break;*/ case WP_ALEVEL0: explodedretch( ent ); break; case WP_ALEVEL1_UPG: poisonCloud( ent ); break; case WP_ALEVEL2_UPG: areaZapFire( ent ); break; case WP_LUCIFER_CANNON: LCChargeFire( ent, qtrue ); break; case WP_ABUILD: case WP_ABUILD2: case WP_HBUILD: case WP_HBUILD2: cancelBuildFire( ent ); break; case WP_BLASTER: detonate( ent ); break; default: break; } }
/* =============== FireWeapon2 =============== */ void FireWeapon2( gentity_t *ent ) { if( ent->client ) { // set aiming directions AngleVectors( ent->client->ps.viewangles, forward, right, up ); CalcMuzzlePoint( ent, forward, right, up, muzzle ); } else { AngleVectors( ent->s.angles2, forward, right, up ); VectorCopy( ent->s.pos.trBase, muzzle ); } // fire the specific weapon switch( ent->s.weapon ) { case WP_ALEVEL0: meleeAttack( ent, LEVEL0_SCRATCH_RANGE, 2, LEVEL0_SCRATCH_DMG, MOD_LEVEL0_BITE ); break; case WP_ALEVEL1_UPG: poisonCloud( ent ); break; case WP_ALEVEL2_UPG: areaZapFire( ent ); break; case WP_LUCIFER_CANNON: LCChargeFire( ent, qtrue ); break; //standard weapons w/o secondary just use melee //dictionary: //meleeAttack( ent, [range], [width], [damage], MOD_[means of death] ); //note: keep width 20 for humans otherwise it will not hit the target in vents. case WP_BLASTER: meleeAttack( ent, BLASTER_MELEE_RANGE, 20, BLASTER_MELEE, MOD_BLASTER ); break; case WP_SHOTGUN: meleeAttack( ent, SHOTGUN_BLAST_RANGE, 20, SHOTGUN_BLAST, MOD_SHOTGUN ); //acts like a forward explosion break; case WP_PULSE_RIFLE: lasGunFire( ent, LASGUN_SPREAD*2 ); break; case WP_CHAINGUN: bulletFire( ent, CHAINGUN_SPREAD, CHAINGUN_DMG, MOD_CHAINGUN ); break; case WP_LOCKBLOB_LAUNCHER: throwGrenade( ent ); break; case WP_MGTURRET: shotgunFire( ent ); shotgunFire( ent ); shotgunFire( ent ); break; case WP_ABUILD: case WP_ABUILD2: case WP_HBUILD: case WP_HBUILD2: cancelBuildFire( ent ); break; default: break; } }