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

Function ObjAddMagazine

engine/Poseidon/Game/Commands/GameStateExtObj.cpp:1248–1259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1246}
1247
1248GameValue ObjAddMagazine(const GameState* state, GameValuePar oper1, GameValuePar oper2)
1249{
1250 EntityAI* ai = dyn_cast<EntityAI>(GetObject(oper1));
1251 if (!ai)
1252 {
1253 return NOTHING;
1254 }
1255 GameStringType magazine = oper2;
1256 ai->AddMagazine(magazine);
1257 ai->AutoReloadAll();
1258 return NOTHING;
1259}
1260
1261GameValue ObjRemoveMagazine(const GameState* state, GameValuePar oper1, GameValuePar oper2)
1262{

Callers

nothing calls this directly

Calls 3

AutoReloadAllMethod · 0.80
GetObjectFunction · 0.70
AddMagazineMethod · 0.45

Tested by

no test coverage detected