Lines Matching refs:ent

11 void weapon_grenade_firex (edict_t *ent, qboolean held);
99 qboolean Pickup_Weapon (edict_t *ent, edict_t *other) in Pickup_Weapon() argument
104 index = ITEM_INDEX(ent->item); in Pickup_Weapon()
109 if (!(ent->spawnflags & (DROPPED_ITEM | DROPPED_PLAYER_ITEM) ) ) in Pickup_Weapon()
115 if (!(ent->spawnflags & DROPPED_ITEM) ) in Pickup_Weapon()
118 ammo = FindItem (ent->item->ammo); in Pickup_Weapon()
124 if (! (ent->spawnflags & DROPPED_PLAYER_ITEM) ) in Pickup_Weapon()
129 ent->flags |= FL_RESPAWN; in Pickup_Weapon()
131 SetRespawn (ent, (int)weaponrespawntime->value); in Pickup_Weapon()
135 ent->flags |= FL_RESPAWN; in Pickup_Weapon()
139 if (other->client->pers.weapon != ent->item && in Pickup_Weapon()
142 other->client->newweapon = ent->item; in Pickup_Weapon()
156 void ChangeWeapon (edict_t *ent) in ChangeWeapon() argument
160 if (ent->client->grenade_time) in ChangeWeapon()
162 ent->client->grenade_time = level.time; in ChangeWeapon()
163 ent->client->weapon_sound = 0; in ChangeWeapon()
165 ent->client->grenade_time = 0; in ChangeWeapon()
167 ent->client->ps.fov = 90; in ChangeWeapon()
168 ent->client->pers.lastweapon = ent->client->pers.weapon; in ChangeWeapon()
169 ent->client->pers.weapon = ent->client->newweapon; in ChangeWeapon()
170 ent->client->newweapon = NULL; in ChangeWeapon()
171 ent->client->machinegun_shots = 0; in ChangeWeapon()
174 if (ent->s.modelindex == 255) { in ChangeWeapon()
175 if (ent->client->pers.weapon) in ChangeWeapon()
176 i = ((ent->client->pers.weapon->weapmodel & 0xff) << 8); in ChangeWeapon()
179 ent->s.skinnum = (ent - g_edicts - 1) | i; in ChangeWeapon()
182 if (ent->client->pers.weapon && ent->client->pers.weapon->ammo) in ChangeWeapon()
183 ent->client->ammo_index = ITEM_INDEX(FindItem(ent->client->pers.weapon->ammo)); in ChangeWeapon()
185 ent->client->ammo_index = 0; in ChangeWeapon()
187 if (!ent->client->pers.weapon) in ChangeWeapon()
189 ent->client->ps.gunindex = 0; in ChangeWeapon()
193 ent->client->weaponstate = WEAPON_ACTIVATING; in ChangeWeapon()
194 ent->client->ps.gunframe = 0; in ChangeWeapon()
196 if(ent->client->akimbo) in ChangeWeapon()
197 ent->client->ps.gunindex = gi.modelindex(ent->client->pers.weapon->akimbo_model); in ChangeWeapon()
199 ent->client->ps.gunindex = gi.modelindex(ent->client->pers.weapon->view_model); in ChangeWeapon()
202 if (ent->client->chasetoggle) in ChangeWeapon()
203 ent->client->ps.gunindex = 0; in ChangeWeapon()
206 ent->client->anim_priority = ANIM_PAIN; in ChangeWeapon()
207 if(ent->client->ps.pmove.pm_flags & PMF_DUCKED) in ChangeWeapon()
209 ent->s.frame = FRAME_crpain1; in ChangeWeapon()
210 ent->client->anim_end = FRAME_crpain4; in ChangeWeapon()
214 ent->s.frame = FRAME_pain301; in ChangeWeapon()
215 ent->client->anim_end = FRAME_pain304; in ChangeWeapon()
225 void NoAmmoWeaponChange (edict_t *ent) in NoAmmoWeaponChange() argument
227 if ( ent->client->pers.inventory[ITEM_INDEX(FindItem("bullets"))] in NoAmmoWeaponChange()
228 && ent->client->pers.inventory[ITEM_INDEX(FindItem("surface to surface missile rack"))] >0 in NoAmmoWeaponChange()
229 && ent->client->pers.inventory[ent->client->ammo_index] >= ammo_rack->value) in NoAmmoWeaponChange()
231 ent->client->newweapon = FindItem ("surface to surface missile rack"); in NoAmmoWeaponChange()
232 ent->client->akimbo = false; in NoAmmoWeaponChange()
235 if ( ent->client->pers.inventory[ITEM_INDEX(FindItem("bullets"))] in NoAmmoWeaponChange()
236 && ent->client->pers.inventory[ITEM_INDEX(FindItem("m4 assault rifle"))] >0 in NoAmmoWeaponChange()
237 && ent->client->pers.inventory[ent->client->ammo_index] >= ammo_m4->value) in NoAmmoWeaponChange()
239 ent->client->newweapon = FindItem ("m4 assault rifle"); in NoAmmoWeaponChange()
240 ent->client->akimbo = true; in NoAmmoWeaponChange()
243 if ( ent->client->pers.inventory[ITEM_INDEX(FindItem("bullets"))] in NoAmmoWeaponChange()
244 && ent->client->pers.inventory[ITEM_INDEX(FindItem("grenades"))] >0 in NoAmmoWeaponChange()
245 && ent->client->pers.inventory[ent->client->ammo_index] >= ammo_grenade->value) in NoAmmoWeaponChange()
247 ent->client->newweapon = FindItem ("grenades"); in NoAmmoWeaponChange()
248 ent->client->akimbo = false; in NoAmmoWeaponChange()
251 if ( ent->client->pers.inventory[ITEM_INDEX(FindItem("bullets"))] in NoAmmoWeaponChange()
252 && ent->client->pers.inventory[ITEM_INDEX(FindItem("pump action shotgun"))] >0 in NoAmmoWeaponChange()
253 && ent->client->pers.inventory[ent->client->ammo_index] >= ammo_pumps->value) in NoAmmoWeaponChange()
255 ent->client->newweapon = FindItem ("pump action shotgun"); in NoAmmoWeaponChange()
256 ent->client->akimbo = true; in NoAmmoWeaponChange()
259 if ( ent->client->pers.inventory[ITEM_INDEX(FindItem("bullets"))] in NoAmmoWeaponChange()
260 && ent->client->pers.inventory[ITEM_INDEX(FindItem("desert eagle pistol"))] >0 in NoAmmoWeaponChange()
261 && ent->client->pers.inventory[ent->client->ammo_index] >= ammo_deserts->value) in NoAmmoWeaponChange()
263 ent->client->newweapon = FindItem ("desert eagle pistol"); in NoAmmoWeaponChange()
264 ent->client->akimbo = true; in NoAmmoWeaponChange()
267 if ( ent->client->pers.inventory[ITEM_INDEX(FindItem("bullets"))] in NoAmmoWeaponChange()
268 && ent->client->pers.inventory[ITEM_INDEX(FindItem("mk 23 pistol"))] >0 in NoAmmoWeaponChange()
269 && ent->client->pers.inventory[ent->client->ammo_index] >= ammo_mk23->value) in NoAmmoWeaponChange()
271 ent->client->newweapon = FindItem ("mk 23 pistol"); in NoAmmoWeaponChange()
272 ent->client->akimbo = true; in NoAmmoWeaponChange()
275 if ( ent->client->pers.inventory[ITEM_INDEX(FindItem("bullets"))] in NoAmmoWeaponChange()
276 && ent->client->pers.inventory[ITEM_INDEX(FindItem("mp5 machine gun"))] >0 in NoAmmoWeaponChange()
277 && ent->client->pers.inventory[ent->client->ammo_index] >= ammo_mp5->value) in NoAmmoWeaponChange()
279 ent->client->newweapon = FindItem ("mp5 machine gun"); in NoAmmoWeaponChange()
280 ent->client->akimbo = true; in NoAmmoWeaponChange()
283 ent->client->newweapon = FindItem ("Fists of Fury"); in NoAmmoWeaponChange()
285 ent->client->akimbo =false; in NoAmmoWeaponChange()
297 void Think_Weapon (edict_t *ent) in Think_Weapon() argument
300 if (ent->health < 1) in Think_Weapon()
302 ent->client->newweapon = NULL; in Think_Weapon()
303 ChangeWeapon (ent); in Think_Weapon()
307 if (ent->client->pers.weapon && ent->client->pers.weapon->weaponthink) in Think_Weapon()
309 is_quad = (ent->client->quad_framenum > level.framenum); in Think_Weapon()
310 if (ent->client->silencer_shots) in Think_Weapon()
314 ent->client->pers.weapon->weaponthink (ent); in Think_Weapon()
326 void Use_Weapon (edict_t *ent, gitem_t *item) in Use_Weapon() argument
332 if (item == ent->client->pers.weapon) in Use_Weapon()
340 if (!ent->client->pers.inventory[ammo_index]) in Use_Weapon()
342 gi.cprintf (ent, PRINT_HIGH, "No %s for %s.\n", ammo_item->pickup_name, item->pickup_name); in Use_Weapon()
346 if (ent->client->pers.inventory[ammo_index] < item->quantity) in Use_Weapon()
348 …gi.cprintf (ent, PRINT_HIGH, "Not enough %s for %s.\n", ammo_item->pickup_name, item->pickup_name); in Use_Weapon()
354 ent->client->newweapon = item; in Use_Weapon()
364 void Drop_Weapon (edict_t *ent, gitem_t *item) in Drop_Weapon() argument
373 …if ( ((item == ent->client->pers.weapon) || (item == ent->client->newweapon))&& (ent->client->pers… in Drop_Weapon()
375 gi.cprintf (ent, PRINT_HIGH, "Can't drop current weapon\n"); in Drop_Weapon()
379 Drop_Item (ent, item); in Drop_Weapon()
380 ent->client->pers.inventory[index]--; in Drop_Weapon()
395ent, int FRAME_ACTIVATE_LAST, int FRAME_FIRE_LAST, int FRAME_IDLE_LAST, int FRAME_DEACTIVATE_LAST,… in Weapon_Generic() argument
402 if(strcmp(ent->client->pers.weapon->classname, "weapon_knives") == 0) in Weapon_Generic()
409 if ((ent->client->ps.gunindex == gi.modelindex(ent->client->pers.weapon->akimbo_model))) in Weapon_Generic()
410 ent->client->ps.gunindex = gi.modelindex(ent->client->pers.weapon->view_model); in Weapon_Generic()
412 if(ent->deadflag || ent->s.modelindex != 255) // VWep animations screw up corpses in Weapon_Generic()
417 if (ent->client->weaponstate == WEAPON_DROPPING) in Weapon_Generic()
419 if (ent->client->ps.gunframe == FRAME_DEACTIVATE_LAST) in Weapon_Generic()
421 ChangeWeapon (ent); in Weapon_Generic()
424 else if ((FRAME_DEACTIVATE_LAST - ent->client->ps.gunframe) == 4) in Weapon_Generic()
426 ent->client->anim_priority = ANIM_REVERSE; in Weapon_Generic()
427 if(ent->client->ps.pmove.pm_flags & PMF_DUCKED) in Weapon_Generic()
429 ent->s.frame = FRAME_crpain4+1; in Weapon_Generic()
430 ent->client->anim_end = FRAME_crpain1; in Weapon_Generic()
434 ent->s.frame = FRAME_pain304+1; in Weapon_Generic()
435 ent->client->anim_end = FRAME_pain301; in Weapon_Generic()
440 ent->client->ps.gunframe++; in Weapon_Generic()
444 if (ent->client->weaponstate == WEAPON_ACTIVATING) in Weapon_Generic()
446 if (ent->client->ps.gunframe == FRAME_ACTIVATE_LAST) in Weapon_Generic()
448 ent->client->weaponstate = WEAPON_READY; in Weapon_Generic()
449 ent->client->ps.gunframe = FRAME_IDLE_FIRST; in Weapon_Generic()
453 ent->client->ps.gunframe++; in Weapon_Generic()
457 if ((ent->client->newweapon) && (ent->client->weaponstate != WEAPON_FIRING)) in Weapon_Generic()
459 ent->client->weaponstate = WEAPON_DROPPING; in Weapon_Generic()
460 ent->client->ps.gunframe = FRAME_DEACTIVATE_FIRST; in Weapon_Generic()
464 ent->client->anim_priority = ANIM_REVERSE; in Weapon_Generic()
465 if(ent->client->ps.pmove.pm_flags & PMF_DUCKED) in Weapon_Generic()
467 ent->s.frame = FRAME_crpain4+1; in Weapon_Generic()
468 ent->client->anim_end = FRAME_crpain1; in Weapon_Generic()
472 ent->s.frame = FRAME_pain304+1; in Weapon_Generic()
473 ent->client->anim_end = FRAME_pain301; in Weapon_Generic()
480 if (ent->client->weaponstate == WEAPON_READY) in Weapon_Generic()
482 if ( ((ent->client->latched_buttons|ent->client->buttons) & BUTTON_ATTACK) || ent->secondaryfire ) in Weapon_Generic()
484 ent->client->latched_buttons &= ~BUTTON_ATTACK; in Weapon_Generic()
485 if ((!ent->client->ammo_index) || in Weapon_Generic()
486 ( ent->client->pers.inventory[ent->client->ammo_index] >= ammouse)) in Weapon_Generic()
488 if (ent->secondaryfire && secondary_fire_weapon) in Weapon_Generic()
489 ent->client->ps.gunframe = FRAME_FIRE_SECONDARY_FIRST; in Weapon_Generic()
491 ent->client->ps.gunframe = FRAME_FIRE_FIRST; in Weapon_Generic()
493 ent->client->weaponstate = WEAPON_FIRING; in Weapon_Generic()
496 ent->client->anim_priority = ANIM_ATTACK; in Weapon_Generic()
497 if (ent->client->ps.pmove.pm_flags & PMF_DUCKED) in Weapon_Generic()
499 ent->s.frame = FRAME_crattak1-1; in Weapon_Generic()
500 ent->client->anim_end = FRAME_crattak9; in Weapon_Generic()
504 ent->s.frame = FRAME_attack1-1; in Weapon_Generic()
505 ent->client->anim_end = FRAME_attack8; in Weapon_Generic()
510 if (level.time >= ent->pain_debounce_time) in Weapon_Generic()
512 gi.sound(ent, CHAN_VOICE, gi.soundindex("weapons/noammo.wav"), 1, ATTN_NORM, 0); in Weapon_Generic()
513 ent->pain_debounce_time = level.time + 1; in Weapon_Generic()
515 NoAmmoWeaponChange (ent); in Weapon_Generic()
520 if (ent->client->ps.gunframe == FRAME_IDLE_LAST) in Weapon_Generic()
522 ent->client->ps.gunframe = FRAME_IDLE_FIRST; in Weapon_Generic()
530 if (ent->client->ps.gunframe == pause_frames[n]) in Weapon_Generic()
538 ent->client->ps.gunframe++; in Weapon_Generic()
543 if (ent->client->weaponstate == WEAPON_FIRING) in Weapon_Generic()
547 if (ent->client->ps.gunframe == fire_frames[n]) in Weapon_Generic()
549 if (ent->client->quad_framenum > level.framenum) in Weapon_Generic()
550 gi.sound(ent, CHAN_ITEM, gi.soundindex("items/damage3.wav"), 1, ATTN_NORM, 0); in Weapon_Generic()
552 fire (ent); in Weapon_Generic()
558 ent->client->ps.gunframe++; in Weapon_Generic()
560 if (ent->client->ps.gunframe == FRAME_IDLE_FIRST+1) in Weapon_Generic()
562 ent->client->weaponstate = WEAPON_READY; in Weapon_Generic()
565 if(strcmp(ent->client->pers.weapon->classname, "weapon_fists") == 0) in Weapon_Generic()
566 if(ent->secondaryfire && ent->client->ps.gunframe == FRAME_ACTIVATE_LAST+4) in Weapon_Generic()
568 ent->client->ps.gunframe = FRAME_IDLE_FIRST+1; in Weapon_Generic()
569 ent->client->weaponstate = WEAPON_READY; in Weapon_Generic()
572 if (ent->client->ps.gunframe > FRAME_FIRE_SECONDARY_LAST && secondary_fire_weapon) in Weapon_Generic()
574 ent->client->ps.gunframe = FRAME_IDLE_FIRST+1; in Weapon_Generic()
575 ent->client->weaponstate = WEAPON_READY; in Weapon_Generic()
594 void weapon_grenade_firex (edict_t *ent, qboolean held) in weapon_grenade_firex() argument
608 VectorSet(offset, 8, 8, ent->viewheight-8); in weapon_grenade_firex()
610 if (ent->client->use) in weapon_grenade_firex()
611 AngleVectors (ent->client->oldplayer->s.angles, forward, right, NULL); in weapon_grenade_firex()
614 AngleVectors (ent->client->v_angle, forward, right, NULL); in weapon_grenade_firex()
615 P_ProjectSource (ent->client, ent->s.origin, offset, forward, right, start); in weapon_grenade_firex()
617 timer = ent->client->grenade_time - level.time; in weapon_grenade_firex()
619 fire_grenade2 (ent, start, forward, damage, speed, timer, radius, held); in weapon_grenade_firex()
622 ent->client->pers.inventory[ent->client->ammo_index]-= ammo_grenade->value; in weapon_grenade_firex()
624 ent->client->grenade_time = level.time + 1.0; in weapon_grenade_firex()
626 if(ent->deadflag || ent->s.modelindex != 255) // VWep animations screw up corpses in weapon_grenade_firex()
631 if (ent->health <= 0) in weapon_grenade_firex()
634 if (ent->client->ps.pmove.pm_flags & PMF_DUCKED) in weapon_grenade_firex()
636 ent->client->anim_priority = ANIM_ATTACK; in weapon_grenade_firex()
637 ent->s.frame = FRAME_crattak1-1; in weapon_grenade_firex()
638 ent->client->anim_end = FRAME_crattak3; in weapon_grenade_firex()
642 ent->client->anim_priority = ANIM_REVERSE; in weapon_grenade_firex()
643 ent->s.frame = FRAME_wave08; in weapon_grenade_firex()
644 ent->client->anim_end = FRAME_wave01; in weapon_grenade_firex()
648 void Weapon_Grenadex (edict_t *ent) //haxored!!!! in Weapon_Grenadex() argument
650 if ((ent->client->newweapon) && (ent->client->weaponstate == WEAPON_READY)) in Weapon_Grenadex()
652 ChangeWeapon (ent); in Weapon_Grenadex()
656 if (ent->client->weaponstate == WEAPON_ACTIVATING) in Weapon_Grenadex()
658 ent->client->weaponstate = WEAPON_READY; in Weapon_Grenadex()
659 ent->client->ps.gunframe = 16; in Weapon_Grenadex()
663 if (ent->client->weaponstate == WEAPON_READY) in Weapon_Grenadex()
665 if ( ((ent->client->latched_buttons|ent->client->buttons) & BUTTON_ATTACK) || ent->secondaryfire ) in Weapon_Grenadex()
667 ent->client->latched_buttons &= ~BUTTON_ATTACK; in Weapon_Grenadex()
668 if (ent->client->pers.inventory[ent->client->ammo_index]) in Weapon_Grenadex()
670 ent->client->ps.gunframe = 1; in Weapon_Grenadex()
671 ent->client->weaponstate = WEAPON_FIRING; in Weapon_Grenadex()
672 ent->client->grenade_time = 0; in Weapon_Grenadex()
676 if (level.time >= ent->pain_debounce_time) in Weapon_Grenadex()
678 gi.sound(ent, CHAN_VOICE, gi.soundindex("weapons/noammo.wav"), 1, ATTN_NORM, 0); in Weapon_Grenadex()
679 ent->pain_debounce_time = level.time + 1; in Weapon_Grenadex()
681 NoAmmoWeaponChange (ent); in Weapon_Grenadex()
686 …if ((ent->client->ps.gunframe == 29) || (ent->client->ps.gunframe == 34) || (ent->client->ps.gunfr… in Weapon_Grenadex()
692 if (++ent->client->ps.gunframe > 48) in Weapon_Grenadex()
693 ent->client->ps.gunframe = 16; in Weapon_Grenadex()
697 if (ent->client->weaponstate == WEAPON_FIRING) in Weapon_Grenadex()
699 if (ent->client->ps.gunframe == 5) in Weapon_Grenadex()
700 gi.sound(ent, CHAN_WEAPON, gi.soundindex("weapons/hgrena1b.wav"), 1, ATTN_NORM, 0); in Weapon_Grenadex()
702 if (ent->client->ps.gunframe == 11) in Weapon_Grenadex()
704 if (!ent->client->grenade_time) in Weapon_Grenadex()
706 ent->client->grenade_time = level.time + GRENADE_TIMER + 0.2; in Weapon_Grenadex()
707 ent->client->weapon_sound = gi.soundindex("weapons/hgrenc1b.wav"); in Weapon_Grenadex()
711 if (!ent->client->grenade_blew_up && level.time >= ent->client->grenade_time) in Weapon_Grenadex()
713 ent->client->weapon_sound = 0; in Weapon_Grenadex()
714 weapon_grenade_fire (ent, true); in Weapon_Grenadex()
715 ent->client->grenade_blew_up = true; in Weapon_Grenadex()
718 if (ent->client->buttons & BUTTON_ATTACK) in Weapon_Grenadex()
721 if (ent->client->grenade_blew_up) in Weapon_Grenadex()
723 if (level.time >= ent->client->grenade_time) in Weapon_Grenadex()
725 ent->client->ps.gunframe = 15; in Weapon_Grenadex()
726 ent->client->grenade_blew_up = false; in Weapon_Grenadex()
735 if (ent->client->ps.gunframe == 12) in Weapon_Grenadex()
737 ent->client->weapon_sound = 0; in Weapon_Grenadex()
738 weapon_grenade_fire (ent, false); in Weapon_Grenadex()
741 if ((ent->client->ps.gunframe == 15) && (level.time < ent->client->grenade_time)) in Weapon_Grenadex()
744 ent->client->ps.gunframe++; in Weapon_Grenadex()
746 if (ent->client->ps.gunframe == 16) in Weapon_Grenadex()
748 ent->client->grenade_time = 0; in Weapon_Grenadex()
749 ent->client->weaponstate = WEAPON_READY; in Weapon_Grenadex()
762 void weapon_grenadelauncher_fire (edict_t *ent) in weapon_grenadelauncher_fire() argument
774 VectorSet(offset, 8, 8, ent->viewheight-8); in weapon_grenadelauncher_fire()
776 if (ent->client->use) in weapon_grenadelauncher_fire()
777 AngleVectors (ent->client->oldplayer->s.angles, forward, right, NULL); in weapon_grenadelauncher_fire()
780 AngleVectors (ent->client->v_angle, forward, right, NULL); in weapon_grenadelauncher_fire()
781 P_ProjectSource (ent->client, ent->s.origin, offset, forward, right, start); in weapon_grenadelauncher_fire()
783 VectorScale (forward, -2, ent->client->kick_origin); in weapon_grenadelauncher_fire()
784 ent->client->kick_angles[0] = -1; in weapon_grenadelauncher_fire()
786 fire_grenade (ent, start, forward, damage, 600, 2.5, radius); in weapon_grenadelauncher_fire()
790 if (ent->client->oldplayer) in weapon_grenadelauncher_fire()
791 gi.WriteShort (ent->client->oldplayer-g_edicts); in weapon_grenadelauncher_fire()
793 gi.WriteShort (ent-g_edicts); in weapon_grenadelauncher_fire()
797 if (ent->client->oldplayer) in weapon_grenadelauncher_fire()
798 gi.multicast (ent->client->oldplayer->s.origin, MULTICAST_PVS); in weapon_grenadelauncher_fire()
800 gi.multicast (ent->s.origin, MULTICAST_PVS); in weapon_grenadelauncher_fire()
803 ent->client->ps.gunframe++; in weapon_grenadelauncher_fire()
805 PlayerNoise(ent, start, PNOISE_WEAPON); in weapon_grenadelauncher_fire()
808 ent->client->pers.inventory[ent->client->ammo_index]--; in weapon_grenadelauncher_fire()
811 void Weapon_GrenadeLauncher (edict_t *ent) in Weapon_GrenadeLauncher() argument
816 …Weapon_Generic (ent, 5, 16, 59, 64, pause_frames, fire_frames, weapon_grenadelauncher_fire, ent->c… in Weapon_GrenadeLauncher()
827 void Weapon_RocketLauncher_Fire (edict_t *ent) in Weapon_RocketLauncher_Fire() argument
845 if (ent->client->use) in Weapon_RocketLauncher_Fire()
846 AngleVectors (ent->client->oldplayer->s.angles, forward, right, NULL); in Weapon_RocketLauncher_Fire()
849 AngleVectors (ent->client->v_angle, forward, right, NULL); in Weapon_RocketLauncher_Fire()
851 VectorScale (forward, -2, ent->client->kick_origin); in Weapon_RocketLauncher_Fire()
852 ent->client->kick_angles[0] = -1; in Weapon_RocketLauncher_Fire()
854 VectorSet(offset, 8, 8, ent->viewheight-8); in Weapon_RocketLauncher_Fire()
855 P_ProjectSource (ent->client, ent->s.origin, offset, forward, right, start); in Weapon_RocketLauncher_Fire()
856 fire_rocket (ent, start, forward, damage, 650, damage_radius, radius_damage); in Weapon_RocketLauncher_Fire()
861 if (ent->client->oldplayer) in Weapon_RocketLauncher_Fire()
862 gi.WriteShort (ent->client->oldplayer-g_edicts); in Weapon_RocketLauncher_Fire()
864 gi.WriteShort (ent-g_edicts); in Weapon_RocketLauncher_Fire()
868 if (ent->client->oldplayer) in Weapon_RocketLauncher_Fire()
869 gi.multicast (ent->client->oldplayer->s.origin, MULTICAST_PVS); in Weapon_RocketLauncher_Fire()
871 gi.multicast (ent->s.origin, MULTICAST_PVS); in Weapon_RocketLauncher_Fire()
874 ent->client->ps.gunframe++; in Weapon_RocketLauncher_Fire()
876 PlayerNoise(ent, start, PNOISE_WEAPON); in Weapon_RocketLauncher_Fire()
879 ent->client->pers.inventory[ent->client->ammo_index]--; in Weapon_RocketLauncher_Fire()
882 void Weapon_RocketLauncher (edict_t *ent) in Weapon_RocketLauncher() argument
887 …Weapon_Generic (ent, 4, 12, 50, 54, pause_frames, fire_frames, Weapon_RocketLauncher_Fire, ent->cl… in Weapon_RocketLauncher()
899 void Blaster_Fire (edict_t *ent, vec3_t g_offset, int damage, qboolean hyper, int effect) in Blaster_Fire() argument
908 if (ent->client->use) in Blaster_Fire()
909 AngleVectors (ent->client->oldplayer->s.angles, forward, right, NULL); in Blaster_Fire()
912 AngleVectors (ent->client->v_angle, forward, right, NULL); in Blaster_Fire()
913 VectorSet(offset, 24, 8, ent->viewheight-8); in Blaster_Fire()
915 P_ProjectSource (ent->client, ent->s.origin, offset, forward, right, start); in Blaster_Fire()
917 VectorScale (forward, -2, ent->client->kick_origin); in Blaster_Fire()
918 ent->client->kick_angles[0] = -1; in Blaster_Fire()
920 fire_blaster (ent, start, forward, damage, 1000, effect, hyper); in Blaster_Fire()
925 if (ent->client->oldplayer) in Blaster_Fire()
926 gi.WriteShort (ent->client->oldplayer-g_edicts); in Blaster_Fire()
928 gi.WriteShort (ent-g_edicts); in Blaster_Fire()
935 if (ent->client->oldplayer) in Blaster_Fire()
936 gi.multicast (ent->client->oldplayer->s.origin, MULTICAST_PVS); in Blaster_Fire()
938 gi.multicast (ent->s.origin, MULTICAST_PVS); in Blaster_Fire()
941 PlayerNoise(ent, start, PNOISE_WEAPON); in Blaster_Fire()
945 void Weapon_Blaster_Fire (edict_t *ent) in Weapon_Blaster_Fire() argument
953 Blaster_Fire (ent, vec3_origin, damage, false, EF_BLASTER); in Weapon_Blaster_Fire()
954 ent->client->ps.gunframe++; in Weapon_Blaster_Fire()
957 void Weapon_Blaster (edict_t *ent) in Weapon_Blaster() argument
962 …Weapon_Generic (ent, 4, 8, 52, 55, pause_frames, fire_frames, Weapon_Blaster_Fire, ent->client->pe… in Weapon_Blaster()
966 void Weapon_HyperBlaster_Fire (edict_t *ent) in Weapon_HyperBlaster_Fire() argument
973 ent->client->weapon_sound = gi.soundindex("weapons/hyprbl1a.wav"); in Weapon_HyperBlaster_Fire()
975 if (!(ent->client->buttons & BUTTON_ATTACK)) in Weapon_HyperBlaster_Fire()
977 ent->client->ps.gunframe++; in Weapon_HyperBlaster_Fire()
981 if (! ent->client->pers.inventory[ent->client->ammo_index] ) in Weapon_HyperBlaster_Fire()
983 if (level.time >= ent->pain_debounce_time) in Weapon_HyperBlaster_Fire()
985 gi.sound(ent, CHAN_VOICE, gi.soundindex("weapons/noammo.wav"), 1, ATTN_NORM, 0); in Weapon_HyperBlaster_Fire()
986 ent->pain_debounce_time = level.time + 1; in Weapon_HyperBlaster_Fire()
988 NoAmmoWeaponChange (ent); in Weapon_HyperBlaster_Fire()
992 rotation = (ent->client->ps.gunframe - 5) * 2*M_PI/6; in Weapon_HyperBlaster_Fire()
997 if ((ent->client->ps.gunframe == 6) || (ent->client->ps.gunframe == 9)) in Weapon_HyperBlaster_Fire()
1005 Blaster_Fire (ent, offset, damage, true, effect); in Weapon_HyperBlaster_Fire()
1007 ent->client->pers.inventory[ent->client->ammo_index]--; in Weapon_HyperBlaster_Fire()
1009 ent->client->anim_priority = ANIM_ATTACK; in Weapon_HyperBlaster_Fire()
1010 if (ent->client->ps.pmove.pm_flags & PMF_DUCKED) in Weapon_HyperBlaster_Fire()
1012 ent->s.frame = FRAME_crattak1 - 1; in Weapon_HyperBlaster_Fire()
1013 ent->client->anim_end = FRAME_crattak9; in Weapon_HyperBlaster_Fire()
1017 ent->s.frame = FRAME_attack1 - 1; in Weapon_HyperBlaster_Fire()
1018 ent->client->anim_end = FRAME_attack8; in Weapon_HyperBlaster_Fire()
1022 ent->client->ps.gunframe++; in Weapon_HyperBlaster_Fire()
1023 if (ent->client->ps.gunframe == 12 && ent->client->pers.inventory[ent->client->ammo_index]) in Weapon_HyperBlaster_Fire()
1024 ent->client->ps.gunframe = 6; in Weapon_HyperBlaster_Fire()
1027 if (ent->client->ps.gunframe == 12) in Weapon_HyperBlaster_Fire()
1029 gi.sound(ent, CHAN_AUTO, gi.soundindex("weapons/hyprbd1a.wav"), 1, ATTN_NORM, 0); in Weapon_HyperBlaster_Fire()
1030 ent->client->weapon_sound = 0; in Weapon_HyperBlaster_Fire()
1035 void Weapon_HyperBlaster (edict_t *ent) in Weapon_HyperBlaster() argument
1040 …Weapon_Generic (ent, 5, 20, 49, 53, pause_frames, fire_frames, Weapon_HyperBlaster_Fire, ent->clie… in Weapon_HyperBlaster()
1051 void Machinegun_Fire (edict_t *ent) in Machinegun_Fire() argument
1061 if (!(ent->client->buttons & BUTTON_ATTACK)) in Machinegun_Fire()
1063 ent->client->machinegun_shots = 0; in Machinegun_Fire()
1064 ent->client->ps.gunframe++; in Machinegun_Fire()
1068 if (ent->client->ps.gunframe == 5) in Machinegun_Fire()
1069 ent->client->ps.gunframe = 4; in Machinegun_Fire()
1071 ent->client->ps.gunframe = 5; in Machinegun_Fire()
1073 if (ent->client->pers.inventory[ent->client->ammo_index] < 1) in Machinegun_Fire()
1075 ent->client->ps.gunframe = 6; in Machinegun_Fire()
1076 if (level.time >= ent->pain_debounce_time) in Machinegun_Fire()
1078 gi.sound(ent, CHAN_VOICE, gi.soundindex("weapons/noammo.wav"), 1, ATTN_NORM, 0); in Machinegun_Fire()
1079 ent->pain_debounce_time = level.time + 1; in Machinegun_Fire()
1081 NoAmmoWeaponChange (ent); in Machinegun_Fire()
1093 ent->client->kick_origin[i] = crandom() * 0.35; in Machinegun_Fire()
1094 ent->client->kick_angles[i] = crandom() * 0.7; in Machinegun_Fire()
1096 ent->client->kick_origin[0] = crandom() * 0.35; in Machinegun_Fire()
1097 ent->client->kick_angles[0] = ent->client->machinegun_shots * -1.5; in Machinegun_Fire()
1102 ent->client->machinegun_shots++; in Machinegun_Fire()
1103 if (ent->client->machinegun_shots > 9) in Machinegun_Fire()
1104 ent->client->machinegun_shots = 9; in Machinegun_Fire()
1109 if (ent->client->use) in Machinegun_Fire()
1110 VectorAdd (ent->client->oldplayer->s.angles, ent->client->kick_angles, angles); in Machinegun_Fire()
1113 VectorAdd (ent->client->v_angle, ent->client->kick_angles, angles); in Machinegun_Fire()
1115 VectorSet(offset, 0, 8, ent->viewheight-8); in Machinegun_Fire()
1116 P_ProjectSource (ent->client, ent->s.origin, offset, forward, right, start); in Machinegun_Fire()
1117 …fire_bullet (ent, start, forward, damage, kick, DEFAULT_BULLET_HSPREAD, DEFAULT_BULLET_VSPREAD, MO… in Machinegun_Fire()
1121 if (ent->client->oldplayer) in Machinegun_Fire()
1122 gi.WriteShort (ent->client->oldplayer-g_edicts); in Machinegun_Fire()
1124 gi.WriteShort (ent-g_edicts); in Machinegun_Fire()
1128 if (ent->client->oldplayer) in Machinegun_Fire()
1129 gi.multicast (ent->client->oldplayer->s.origin, MULTICAST_PVS); in Machinegun_Fire()
1131 gi.multicast (ent->s.origin, MULTICAST_PVS); in Machinegun_Fire()
1134 PlayerNoise(ent, start, PNOISE_WEAPON); in Machinegun_Fire()
1137 ent->client->pers.inventory[ent->client->ammo_index]--; in Machinegun_Fire()
1139 ent->client->anim_priority = ANIM_ATTACK; in Machinegun_Fire()
1140 if (ent->client->ps.pmove.pm_flags & PMF_DUCKED) in Machinegun_Fire()
1142 ent->s.frame = FRAME_crattak1 - (int) (random()+0.25); in Machinegun_Fire()
1143 ent->client->anim_end = FRAME_crattak9; in Machinegun_Fire()
1147 ent->s.frame = FRAME_attack1 - (int) (random()+0.25); in Machinegun_Fire()
1148 ent->client->anim_end = FRAME_attack8; in Machinegun_Fire()
1152 void Weapon_Machinegun (edict_t *ent) in Weapon_Machinegun() argument
1157 …Weapon_Generic (ent, 3, 5, 45, 49, pause_frames, fire_frames, Machinegun_Fire, ent->client->pers.w… in Weapon_Machinegun()
1160 void Chaingun_Fire (edict_t *ent) in Chaingun_Fire() argument
1176 if (ent->client->ps.gunframe == 5) in Chaingun_Fire()
1177 gi.sound(ent, CHAN_AUTO, gi.soundindex("weapons/chngnu1a.wav"), 1, ATTN_IDLE, 0); in Chaingun_Fire()
1179 if ((ent->client->ps.gunframe == 14) && !(ent->client->buttons & BUTTON_ATTACK)) in Chaingun_Fire()
1181 ent->client->ps.gunframe = 32; in Chaingun_Fire()
1182 ent->client->weapon_sound = 0; in Chaingun_Fire()
1185 else if ((ent->client->ps.gunframe == 21) && (ent->client->buttons & BUTTON_ATTACK) in Chaingun_Fire()
1186 && ent->client->pers.inventory[ent->client->ammo_index]) in Chaingun_Fire()
1188 ent->client->ps.gunframe = 15; in Chaingun_Fire()
1192 ent->client->ps.gunframe++; in Chaingun_Fire()
1195 if (ent->client->ps.gunframe == 22) in Chaingun_Fire()
1197 ent->client->weapon_sound = 0; in Chaingun_Fire()
1198 gi.sound(ent, CHAN_AUTO, gi.soundindex("weapons/chngnd1a.wav"), 1, ATTN_IDLE, 0); in Chaingun_Fire()
1202 ent->client->weapon_sound = gi.soundindex("weapons/chngnl1a.wav"); in Chaingun_Fire()
1205 ent->client->anim_priority = ANIM_ATTACK; in Chaingun_Fire()
1206 if (ent->client->ps.pmove.pm_flags & PMF_DUCKED) in Chaingun_Fire()
1208 ent->s.frame = FRAME_crattak1 - (ent->client->ps.gunframe & 1); in Chaingun_Fire()
1209 ent->client->anim_end = FRAME_crattak9; in Chaingun_Fire()
1213 ent->s.frame = FRAME_attack1 - (ent->client->ps.gunframe & 1); in Chaingun_Fire()
1214 ent->client->anim_end = FRAME_attack8; in Chaingun_Fire()
1217 if (ent->client->ps.gunframe <= 9) in Chaingun_Fire()
1219 else if (ent->client->ps.gunframe <= 14) in Chaingun_Fire()
1221 if (ent->client->buttons & BUTTON_ATTACK) in Chaingun_Fire()
1229 if (ent->client->pers.inventory[ent->client->ammo_index] < shots) in Chaingun_Fire()
1230 shots = ent->client->pers.inventory[ent->client->ammo_index]; in Chaingun_Fire()
1234 if (level.time >= ent->pain_debounce_time) in Chaingun_Fire()
1236 gi.sound(ent, CHAN_VOICE, gi.soundindex("weapons/noammo.wav"), 1, ATTN_NORM, 0); in Chaingun_Fire()
1237 ent->pain_debounce_time = level.time + 1; in Chaingun_Fire()
1239 NoAmmoWeaponChange (ent); in Chaingun_Fire()
1251 ent->client->kick_origin[i] = crandom() * 0.35; in Chaingun_Fire()
1252 ent->client->kick_angles[i] = crandom() * 0.7; in Chaingun_Fire()
1259 if (ent->client->use) in Chaingun_Fire()
1260 AngleVectors (ent->client->oldplayer->s.angles, forward, right, NULL); in Chaingun_Fire()
1263 AngleVectors (ent->client->v_angle, forward, right, up); in Chaingun_Fire()
1266 VectorSet(offset, 0, r, u + ent->viewheight-8); in Chaingun_Fire()
1267 P_ProjectSource (ent->client, ent->s.origin, offset, forward, right, start); in Chaingun_Fire()
1269 …fire_bullet (ent, start, forward, damage, kick, DEFAULT_BULLET_HSPREAD, DEFAULT_BULLET_VSPREAD, MO… in Chaingun_Fire()
1275 if (ent->client->oldplayer) in Chaingun_Fire()
1276 gi.WriteShort (ent->client->oldplayer-g_edicts); in Chaingun_Fire()
1278 gi.WriteShort (ent-g_edicts); in Chaingun_Fire()
1282 if (ent->client->oldplayer) in Chaingun_Fire()
1283 gi.multicast (ent->client->oldplayer->s.origin, MULTICAST_PVS); in Chaingun_Fire()
1285 gi.multicast (ent->s.origin, MULTICAST_PVS); in Chaingun_Fire()
1288 PlayerNoise(ent, start, PNOISE_WEAPON); in Chaingun_Fire()
1291 ent->client->pers.inventory[ent->client->ammo_index] -= shots; in Chaingun_Fire()
1295 void Weapon_Chaingun (edict_t *ent) in Weapon_Chaingun() argument
1300 …Weapon_Generic (ent, 4, 31, 61, 64, pause_frames, fire_frames, Chaingun_Fire, ent->client->pers.we… in Weapon_Chaingun()
1312 void weapon_shotgun_fire (edict_t *ent) in weapon_shotgun_fire() argument
1320 if (ent->client->ps.gunframe == 9) in weapon_shotgun_fire()
1322 ent->client->ps.gunframe++; in weapon_shotgun_fire()
1327 if (ent->client->use) in weapon_shotgun_fire()
1328 AngleVectors (ent->client->oldplayer->s.angles, forward, right, NULL); in weapon_shotgun_fire()
1331 AngleVectors (ent->client->v_angle, forward, right, NULL); in weapon_shotgun_fire()
1333 VectorScale (forward, -2, ent->client->kick_origin); in weapon_shotgun_fire()
1334 ent->client->kick_angles[0] = -2; in weapon_shotgun_fire()
1336 VectorSet(offset, 0, 8, ent->viewheight-8); in weapon_shotgun_fire()
1337 P_ProjectSource (ent->client, ent->s.origin, offset, forward, right, start); in weapon_shotgun_fire()
1346 …fire_shotgun (ent, start, forward, damage, kick, 500, 500, DEFAULT_DEATHMATCH_SHOTGUN_COUNT, MOD_S… in weapon_shotgun_fire()
1348 fire_shotgun (ent, start, forward, damage, kick, 500, 500, DEFAULT_SHOTGUN_COUNT, MOD_SHOTGUN); in weapon_shotgun_fire()
1353 if (ent->client->oldplayer) in weapon_shotgun_fire()
1354 gi.WriteShort (ent->client->oldplayer-g_edicts); in weapon_shotgun_fire()
1356 gi.WriteShort (ent-g_edicts); in weapon_shotgun_fire()
1360 if (ent->client->oldplayer) in weapon_shotgun_fire()
1361 gi.multicast (ent->client->oldplayer->s.origin, MULTICAST_PVS); in weapon_shotgun_fire()
1363 gi.multicast (ent->s.origin, MULTICAST_PVS); in weapon_shotgun_fire()
1366 ent->client->ps.gunframe++; in weapon_shotgun_fire()
1367 PlayerNoise(ent, start, PNOISE_WEAPON); in weapon_shotgun_fire()
1370 ent->client->pers.inventory[ent->client->ammo_index]--; in weapon_shotgun_fire()
1373 void Weapon_Shotgun (edict_t *ent) in Weapon_Shotgun() argument
1378 …Weapon_Generic (ent, 7, 18, 36, 39, pause_frames, fire_frames, weapon_shotgun_fire, ent->client->p… in Weapon_Shotgun()
1382 void weapon_supershotgun_fire (edict_t *ent) in weapon_supershotgun_fire() argument
1392 if (ent->client->use) in weapon_supershotgun_fire()
1393 AngleVectors (ent->client->oldplayer->s.angles, forward, right, NULL); in weapon_supershotgun_fire()
1396 AngleVectors (ent->client->v_angle, forward, right, NULL); in weapon_supershotgun_fire()
1398 VectorScale (forward, -2, ent->client->kick_origin); in weapon_supershotgun_fire()
1399 ent->client->kick_angles[0] = -2; in weapon_supershotgun_fire()
1401 VectorSet(offset, 0, 8, ent->viewheight-8); in weapon_supershotgun_fire()
1402 P_ProjectSource (ent->client, ent->s.origin, offset, forward, right, start); in weapon_supershotgun_fire()
1411 if (ent->client->use) in weapon_supershotgun_fire()
1413 v[PITCH] = ent->client->oldplayer->s.angles[PITCH]; in weapon_supershotgun_fire()
1414 v[YAW] = ent->client->oldplayer->s.angles[YAW] - 5; in weapon_supershotgun_fire()
1415 v[ROLL] = ent->client->oldplayer->s.angles[ROLL]; in weapon_supershotgun_fire()
1419 v[PITCH] = ent->client->v_angle[PITCH]; in weapon_supershotgun_fire()
1420 v[YAW] = ent->client->v_angle[YAW] - 5; in weapon_supershotgun_fire()
1421 v[ROLL] = ent->client->v_angle[ROLL]; in weapon_supershotgun_fire()
1424 …fire_shotgun (ent, start, forward, damage, kick, DEFAULT_SHOTGUN_HSPREAD, DEFAULT_SHOTGUN_VSPREAD,… in weapon_supershotgun_fire()
1425 if (ent->client->use) in weapon_supershotgun_fire()
1426 v[YAW] = ent->client->oldplayer->s.angles[YAW] + 5; in weapon_supershotgun_fire()
1429 v[YAW] = ent->client->v_angle[YAW] + 5; in weapon_supershotgun_fire()
1431 …fire_shotgun (ent, start, forward, damage, kick, DEFAULT_SHOTGUN_HSPREAD, DEFAULT_SHOTGUN_VSPREAD,… in weapon_supershotgun_fire()
1436 if (ent->client->oldplayer) in weapon_supershotgun_fire()
1437 gi.WriteShort (ent->client->oldplayer-g_edicts); in weapon_supershotgun_fire()
1439 gi.WriteShort (ent-g_edicts); in weapon_supershotgun_fire()
1443 if (ent->client->oldplayer) in weapon_supershotgun_fire()
1444 gi.multicast (ent->client->oldplayer->s.origin, MULTICAST_PVS); in weapon_supershotgun_fire()
1446 gi.multicast (ent->s.origin, MULTICAST_PVS); in weapon_supershotgun_fire()
1449 ent->client->ps.gunframe++; in weapon_supershotgun_fire()
1450 PlayerNoise(ent, start, PNOISE_WEAPON); in weapon_supershotgun_fire()
1453 ent->client->pers.inventory[ent->client->ammo_index] -= 2; in weapon_supershotgun_fire()
1456 void Weapon_SuperShotgun (edict_t *ent) in Weapon_SuperShotgun() argument
1461 …Weapon_Generic (ent, 6, 17, 57, 61, pause_frames, fire_frames, weapon_supershotgun_fire, ent->clie… in Weapon_SuperShotgun()
1474 void weapon_railgun_fire (edict_t *ent) in weapon_railgun_fire() argument
1500 if (ent->client->use) in weapon_railgun_fire()
1501 AngleVectors (ent->client->oldplayer->s.angles, forward, right, NULL); in weapon_railgun_fire()
1504 AngleVectors (ent->client->v_angle, forward, right, NULL); in weapon_railgun_fire()
1506 VectorScale (forward, -3, ent->client->kick_origin); in weapon_railgun_fire()
1507 ent->client->kick_angles[0] = -3; in weapon_railgun_fire()
1509 VectorSet(offset, 0, 7, ent->viewheight-8); in weapon_railgun_fire()
1510 P_ProjectSource (ent->client, ent->s.origin, offset, forward, right, start); in weapon_railgun_fire()
1511 fire_rail (ent, start, forward, damage, kick); in weapon_railgun_fire()
1517 if (ent->client->use) in weapon_railgun_fire()
1518 gi.WriteShort (ent->client->oldplayer-g_edicts); in weapon_railgun_fire()
1520 gi.WriteShort (ent-g_edicts); in weapon_railgun_fire()
1525 if (ent->client->use) in weapon_railgun_fire()
1526 gi.multicast (ent->client->oldplayer->s.origin, MULTICAST_PVS); in weapon_railgun_fire()
1528 gi.multicast (ent->s.origin, MULTICAST_PVS); in weapon_railgun_fire()
1531 ent->client->ps.gunframe++; in weapon_railgun_fire()
1532 PlayerNoise(ent, start, PNOISE_WEAPON); in weapon_railgun_fire()
1535 ent->client->pers.inventory[ent->client->ammo_index]--; in weapon_railgun_fire()
1539 void Weapon_Railgun (edict_t *ent) in Weapon_Railgun() argument
1544 …Weapon_Generic (ent, 3, 18, 56, 61, pause_frames, fire_frames, weapon_railgun_fire, ent->client->p… in Weapon_Railgun()
1556 void weapon_bfg_fire (edict_t *ent) in weapon_bfg_fire() argument
1568 if (ent->client->ps.gunframe == 9) in weapon_bfg_fire()
1573 if (ent->client->oldplayer) in weapon_bfg_fire()
1574 gi.WriteShort (ent->client->oldplayer-g_edicts); in weapon_bfg_fire()
1576 gi.WriteShort (ent-g_edicts); in weapon_bfg_fire()
1580 if (ent->client->oldplayer) in weapon_bfg_fire()
1581 gi.multicast (ent->client->oldplayer->s.origin, MULTICAST_PVS); in weapon_bfg_fire()
1583 gi.multicast (ent->s.origin, MULTICAST_PVS); in weapon_bfg_fire()
1586 ent->client->ps.gunframe++; in weapon_bfg_fire()
1588 PlayerNoise(ent, start, PNOISE_WEAPON); in weapon_bfg_fire()
1594 if (ent->client->pers.inventory[ent->client->ammo_index] < 50) in weapon_bfg_fire()
1596 ent->client->ps.gunframe++; in weapon_bfg_fire()
1604 if (ent->client->use) in weapon_bfg_fire()
1605 AngleVectors (ent->client->oldplayer->s.angles, forward, right, NULL); in weapon_bfg_fire()
1608 AngleVectors (ent->client->v_angle, forward, right, NULL); in weapon_bfg_fire()
1610 VectorScale (forward, -2, ent->client->kick_origin); in weapon_bfg_fire()
1613 ent->client->v_dmg_pitch = -40; in weapon_bfg_fire()
1614 ent->client->v_dmg_roll = crandom()*8; in weapon_bfg_fire()
1615 ent->client->v_dmg_time = level.time + DAMAGE_TIME; in weapon_bfg_fire()
1617 VectorSet(offset, 8, 8, ent->viewheight-8); in weapon_bfg_fire()
1618 P_ProjectSource (ent->client, ent->s.origin, offset, forward, right, start); in weapon_bfg_fire()
1619 fire_bfg (ent, start, forward, damage, 400, damage_radius); in weapon_bfg_fire()
1621 ent->client->ps.gunframe++; in weapon_bfg_fire()
1623 PlayerNoise(ent, start, PNOISE_WEAPON); in weapon_bfg_fire()
1626 ent->client->pers.inventory[ent->client->ammo_index] -= 50; in weapon_bfg_fire()
1629 void Weapon_BFG (edict_t *ent) in Weapon_BFG() argument
1634 …Weapon_Generic (ent, 8, 32, 55, 58, pause_frames, fire_frames, weapon_bfg_fire, ent->client->pers.… in Weapon_BFG()