MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / startFiring

Method startFiring

game/state/shared/aequipment.cpp:275–289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

273}
274
275void AEquipment::startFiring(WeaponAimingMode fireMode, bool instant)
276{
277 if (ammo == 0)
278 return;
279 if (instant)
280 {
281 weapon_fire_ticks_remaining = TICKS_PER_SECOND / 4;
282 }
283 else
284 {
285 weapon_fire_ticks_remaining = getPayloadType()->fire_delay / (int)fireMode;
286 }
287 readyToFire = false;
288 aimingMode = fireMode;
289}
290
291static sp<AEquipment> getAutoreloadAmmoType(const AEquipment &weapon)
292{

Callers 1

updateFiringMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected