Returns true if the player has this weapon (this fuction should be moved)
| 2417 | #define ENERGY_BONUS 12.0f |
| 2418 | // Returns true if the player has this weapon (this fuction should be moved) |
| 2419 | bool PlayerHasWeapon(int slot, int weapon_index) { |
| 2420 | if (Players[slot].weapon_flags & HAS_FLAG(weapon_index)) |
| 2421 | if (weapon_index >= SECONDARY_INDEX) |
| 2422 | return (Players[slot].weapon_ammo[weapon_index] > 0); // have secondary only if have ammo |
| 2423 | else |
| 2424 | return true; // primaries don't check for ammo |
| 2425 | else |
| 2426 | return false; |
| 2427 | } |
| 2428 | // Adds weapon ammo to a player, returns 0 if it couldn't |
| 2429 | // This function should be moved! |
| 2430 | int AddWeaponAmmo(int slot, int weap_index, int ammo) { |
no outgoing calls
no test coverage detected