MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / testCondition

Method testCondition

Engine/source/T3D/trigger.cpp:698–713  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

696}
697
698bool Trigger::testCondition()
699{
700 if (mTripCondition.isEmpty())
701 return true; //we've got no tests to run so just do it
702
703 //test the mapper plugged in condition line
704 String resVar = getIdString() + String(".result");
705 Con::setBoolVariable(resVar.c_str(), false);
706 String command = resVar + "=" + mTripCondition + ";";
707 Con::evaluatef(command.c_str());
708 if (Con::getBoolVariable(resVar.c_str()) == 1)
709 {
710 return true;
711 }
712 return false;
713}
714
715bool Trigger::evalCmD(String* cmd)
716{

Callers

nothing calls this directly

Calls 6

setBoolVariableFunction · 0.85
evaluatefFunction · 0.85
getBoolVariableFunction · 0.85
StringClass · 0.50
isEmptyMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected