MCPcopy Create free account
hub / github.com/Phobos-developers/Phobos / CanCapture

Method CanCapture

src/Ext/CaptureManager/Body.cpp:5–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3#include <Ext/Techno/Body.h>
4
5bool CaptureManagerExt::CanCapture(CaptureManagerClass* pManager, TechnoClass* pTarget)
6{
7 if (pManager->MaxControlNodes == 1)
8 return pManager->CanCapture(pTarget);
9
10 const auto pTechnoTypeExt = TechnoExt::ExtMap.Find(pManager->Owner)->TypeExtData;
11 if (pTechnoTypeExt->MultiMindControl_ReleaseVictim)
12 {
13 // I hate Ares' completely rewritten things - secsome
14 pManager->MaxControlNodes += 1;
15 const bool result = pManager->CanCapture(pTarget);
16 pManager->MaxControlNodes -= 1;
17 return result;
18 }
19
20 return pManager->CanCapture(pTarget);
21}
22
23bool CaptureManagerExt::FreeUnit(CaptureManagerClass* pManager, TechnoClass* pTarget, bool silent)
24{

Callers

nothing calls this directly

Calls 1

FindMethod · 0.45

Tested by

no test coverage detected