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

Function AvoidBeInWith

engine/Poseidon/AI/AIUnitImpl.cpp:205–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205static bool AvoidBeInWith(AICenter* center, Person* person)
206{
207 if (!person)
208 {
209 return false;
210 }
211 if (!center->IsEnemy(person->GetTargetSide()))
212 {
213 return false;
214 }
215 if (person->Brain() && person->Brain()->GetCaptive())
216 {
217 return false;
218 }
219
220 return true;
221}
222
223bool AIUnit::ProcessGetIn(Transport& veh)
224{

Callers 2

ProcessGetInMethod · 0.85
ProcessGetIn2Method · 0.85

Calls 4

IsEnemyMethod · 0.80
BrainMethod · 0.80
GetCaptiveMethod · 0.80
GetTargetSideMethod · 0.45

Tested by

no test coverage detected