MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / spendBullet

Method spendBullet

src/Savegame/BattleItem.cpp:195–202  ·  view source on GitHub ↗

* Spends a bullet from the ammo in this item. * @return True if there are bullets left. */

Source from the content-addressed store, hash-verified

193 * @return True if there are bullets left.
194 */
195bool BattleItem::spendBullet()
196{
197 _ammoQuantity--;
198 if (_ammoQuantity == 0)
199 return false;
200 else
201 return true;
202}
203
204/**
205 * Gets the item's owner.

Callers 3

createNewProjectileMethod · 0.80
thinkMethod · 0.80
performMeleeAttackMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected