Returns true if there is enough ammo to allow this player to fire, else false
| 3309 | |
| 3310 | // Returns true if there is enough ammo to allow this player to fire, else false |
| 3311 | bool MultiEnoughAmmoToFire(int slot, int wb_index) { |
| 3312 | ship *ship = &Ships[Players[slot].ship_index]; |
| 3313 | otype_wb_info *wb = &ship->static_wb[wb_index]; |
| 3314 | |
| 3315 | if (wb->ammo_usage > 0 && Players[slot].weapon_ammo[wb_index] <= 0) |
| 3316 | return false; |
| 3317 | |
| 3318 | return true; |
| 3319 | } |
| 3320 | |
| 3321 | void MultiSubtractAmmoToFire(int slot, int wb_index) { |
| 3322 | ship *ship = &Ships[Players[slot].ship_index]; |
no outgoing calls
no test coverage detected