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

Function setBoolVariable

Engine/source/console/console.cpp:820–835  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

818}
819
820void setBoolVariable(const char *varName, bool value)
821{
822 SimObject *obj = NULL;
823 const char *objField = NULL;
824
825 if (getVariableObjectField(varName, &obj, &objField))
826 {
827 obj->setDataField(StringTable->insert(objField), 0, value ? "1" : "0");
828 }
829 else
830 {
831 varName = prependDollar(varName);
832 Dictionary::Entry *entry = getAddVariableEntry(varName);
833 entry->setStringValue(value ? "1" : "0");
834 }
835}
836
837void setIntVariable(const char *varName, S32 value)
838{

Callers 10

torque_setconsoleboolFunction · 0.85
setVerboseMethod · 0.85
processTimeEventFunction · 0.85
DefineConsoleFunctionFunction · 0.85
setScriptValueMethod · 0.85
onActionMethod · 0.85
onMessageMethod · 0.85
activateMethod · 0.85
setScreenModeMethod · 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