MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / AutoReloadAll

Method AutoReloadAll

engine/Poseidon/AI/VehicleAICombat.cpp:758–781  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

756}
757
758int EntityAI::AutoReloadAll()
759{
760 int ret = -1;
761 for (int s = 0; s < NMagazineSlots();)
762 {
763 const MagazineSlot& slot = GetMagazineSlot(s);
764 if (!slot._magazine && slot._muzzle)
765 {
766 if (AutoReload(s) && ret < 0)
767 {
768 ret = s;
769 }
770 }
771 if (slot._muzzle)
772 {
773 s += slot._muzzle->_nModes;
774 }
775 else
776 {
777 s++;
778 }
779 }
780 return ret;
781}
782
783void EntityAI::Draw(int level, ClipFlags clipFlags, const FrameBase& pos)
784{

Callers 6

InitCenterMethod · 0.80
ApplyMethod · 0.80
ObjWeaponsFromPoolFunction · 0.80
ObjAddMagazinePreciseFunction · 0.80
ObjAddWeaponFunction · 0.80
ObjAddMagazineFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected