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

Function setIntVariable

Engine/source/console/console.cpp:889–906  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

887}
888
889void setIntVariable(const char *varName, S32 value)
890{
891 SimObject *obj = NULL;
892 const char *objField = NULL;
893
894 if (getVariableObjectField(varName, &obj, &objField))
895 {
896 char varBuffer[32];
897 dSprintf(varBuffer, sizeof(varBuffer), "%d", value);
898 obj->setDataField(StringTable->insert(objField), 0, varBuffer);
899 }
900 else
901 {
902 varName = prependDollar(varName);
903 Dictionary::Entry *entry = getAddVariableEntry(varName);
904 entry->setIntValue(value);
905 }
906}
907
908void setFloatVariable(const char *varName, F32 value)
909{

Callers 15

updateMethod · 0.85
initMethod · 0.85
initPersistFieldsMethod · 0.85
initPersistFieldsMethod · 0.85
initPersistFieldsMethod · 0.85
CMDerrorFunction · 0.85
createMethod · 0.85
initMethod · 0.85
DefineNewEngineFunctionFunction · 0.85
exportToConsoleMethod · 0.85
clearAllLightsMethod · 0.85

Calls 7

getVariableObjectFieldFunction · 0.85
dSprintfFunction · 0.85
prependDollarFunction · 0.85
getAddVariableEntryFunction · 0.85
setDataFieldMethod · 0.45
insertMethod · 0.45
setIntValueMethod · 0.45

Tested by

no test coverage detected