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

Function ListAllowGetIn

engine/Poseidon/Game/Commands/GameStateExtGrp.cpp:570–595  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

568}
569
570GameValue ListAllowGetIn(const GameState* state, GameValuePar oper1, GameValuePar oper2)
571{
572 const GameArrayType& array = oper1;
573 bool allow = oper2;
574 for (int i = 0; i < array.Size(); i++)
575 {
576 Object* obj = GetObject(array[i]);
577 if (!obj)
578 {
579 continue;
580 }
581 EntityAI* ai = dyn_cast<EntityAI>(obj);
582 if (!ai)
583 {
584 continue;
585 }
586 AIUnit* unit = ai->CommanderUnit();
587 if (!unit)
588 {
589 continue;
590 }
591 unit->AllowGetIn(allow);
592 }
593
594 return NOTHING;
595}
596
597GameValue ListOrderGetIn(const GameState* state, GameValuePar oper1, GameValuePar oper2)
598{

Callers

nothing calls this directly

Calls 4

AllowGetInMethod · 0.80
GetObjectFunction · 0.70
SizeMethod · 0.45
CommanderUnitMethod · 0.45

Tested by

no test coverage detected