MCPcopy Create free account
hub / github.com/assaultcube/AC / CheckReload

Method CheckReload

source/src/bot/bot_ai.cpp:712–721  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

710}
711
712void CBot::CheckReload() // reload gun if no enemies are around
713{
714 if(m_pMyEnt->mag[m_pMyEnt->weaponsel->type] >= WeaponInfoTable[m_pMyEnt->weaponsel->type].sMinDesiredAmmo) return; // do not reload if mindesiredammo is satisfied
715 if(m_pMyEnt->enemy && m_pMyEnt->mag[m_pMyEnt->weaponsel->type])
716 {
717 return; // ignore the enemy, if no ammo in mag.
718 }
719 tryreload(m_pMyEnt);
720 return;
721}
722
723void CBot::CheckScope()
724{

Callers

nothing calls this directly

Calls 1

tryreloadFunction · 0.85

Tested by

no test coverage detected