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

Function setBoolVariable

Engine/source/console/console.cpp:872–887  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

870}
871
872void setBoolVariable(const char *varName, bool value)
873{
874 SimObject *obj = NULL;
875 const char *objField = NULL;
876
877 if (getVariableObjectField(varName, &obj, &objField))
878 {
879 obj->setDataField(StringTable->insert(objField), 0, value ? "1" : "0");
880 }
881 else
882 {
883 varName = prependDollar(varName);
884 Dictionary::Entry *entry = getAddVariableEntry(varName);
885 entry->setStringValue(value ? "1" : "0");
886 }
887}
888
889void setIntVariable(const char *varName, S32 value)
890{

Callers 10

_processSDLEventMethod · 0.85
DefineNewEngineFunctionFunction · 0.85
setVerboseMethod · 0.85
processTimeEventFunction · 0.85
DefineEngineFunctionFunction · 0.85
testConditionMethod · 0.85
setScriptValueMethod · 0.85
onActionMethod · 0.85
onMessageMethod · 0.85
GL_EXT_InitFunction · 0.85

Calls 6

getVariableObjectFieldFunction · 0.85
prependDollarFunction · 0.85
getAddVariableEntryFunction · 0.85
setDataFieldMethod · 0.45
insertMethod · 0.45
setStringValueMethod · 0.45

Tested by

no test coverage detected