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

Method NewOperator

engine/Evaluator/express.cpp:2243–2258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2241 functions[n] = o;
2242}
2243void GameState::NewOperator(const GameOperator& op)
2244{
2245 GameOperators& ot = _operators[op._name];
2246 if (_operators.IsNull(ot))
2247 {
2248 _operators.Add(GameOperators(op._opName, op._priority));
2249 }
2250 GameOperators& operators = _operators[op._name];
2251 GameOperator o = op;
2252 o._name = operators._name;
2253
2254 int n = operators.Size();
2255 operators.Realloc(n + 1);
2256 operators.Resize(n + 1);
2257 operators[n] = o;
2258}
2259
2260struct DicContext
2261{

Callers 3

NewOperatorsMethod · 0.80
GameStateExt.cppFile · 0.80

Calls 6

GameOperatorsClass · 0.85
IsNullMethod · 0.45
AddMethod · 0.45
SizeMethod · 0.45
ReallocMethod · 0.45
ResizeMethod · 0.45

Tested by

no test coverage detected