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

Function CmdCall

engine/Evaluator/EvalState.cpp:734–745  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

732}
733
734static GameValue CmdCall(const GameState* state, GameValuePar lhs, GameValuePar rhs)
735{
736 // lhs becomes _this for the evaluated block.
737 RString code = rhs;
738 auto* eval = getEval(state);
739 GameVarSpace local(eval->GetContext());
740 eval->BeginContext(&local);
741 eval->VarSetLocal("_this", lhs, true);
742 GameValue result = eval->EvaluateMultiple(code);
743 eval->EndContext();
744 return result;
745}
746
747// No-op: the evaluator has no script scope to terminate.
748static GameValue CmdExit(const GameState*)

Callers

nothing calls this directly

Calls 6

getEvalFunction · 0.85
BeginContextMethod · 0.80
VarSetLocalMethod · 0.80
EvaluateMultipleMethod · 0.80
EndContextMethod · 0.80
GetContextMethod · 0.45

Tested by

no test coverage detected