Does weapon battery stuff for the permissable network architecture
| 2818 | |
| 2819 | // Does weapon battery stuff for the permissable network architecture |
| 2820 | void DoPermissableWeaponMask(int weapon_battery_index) { |
| 2821 | player *player = &Players[Player_num]; |
| 2822 | object *objp = &Objects[player->objnum]; |
| 2823 | ship *ship = &Ships[player->ship_index]; |
| 2824 | otype_wb_info *wb = &ship->static_wb[weapon_battery_index]; |
| 2825 | dynamic_wb_info *p_dwb = &objp->dynamic_wb[weapon_battery_index]; |
| 2826 | |
| 2827 | player->last_fire_weapon_time = Gametime; |
| 2828 | |
| 2829 | p_dwb->cur_firing_mask++; |
| 2830 | p_dwb->last_fire_time = Gametime; |
| 2831 | |
| 2832 | if (p_dwb->cur_firing_mask >= wb->num_masks) |
| 2833 | p_dwb->cur_firing_mask = 0; |
| 2834 | } |
| 2835 | |
| 2836 | // Fires a weapon from our player. Won't fire if ammo/energy requirements aren't met. |
| 2837 | // Parameters: weapon_type - either PW_PRIMARY or PW_SECONDARY |
no outgoing calls
no test coverage detected