MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / ffGetValue

Method ffGetValue

ogsr_engine/xrGame/ef_pattern.cpp:126–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124}
125
126float CPatternFunction::ffGetValue()
127{
128 for (u32 i = 0; i < m_dwVariableCount; ++i)
129 m_dwaVariableValues[i] = ef_storage().m_fpaBaseFunctions[m_dwaVariableTypes[i]]->dwfGetDiscreteValue(m_dwaAtomicFeatureRange[i]);
130
131#ifdef DEBUG
132 if (psAI_Flags.test(aiFuncs))
133 {
134 float value = ffEvaluate();
135 string256 caString;
136
137 int j = sprintf_s(caString, sizeof(caString), "%32s (", m_caName);
138
139 for (i = 0; i < m_dwVariableCount; ++i)
140 j += sprintf_s(caString + j, sizeof(caString) - j, " %3d", m_dwaVariableValues[i] + 1);
141
142 sprintf_s(caString + j, sizeof(caString) - j, ") = %7.2f", value);
143 Msg("- %s", caString);
144 return (value);
145 }
146#endif
147
148 return (ffEvaluate());
149}

Callers

nothing calls this directly

Calls 3

MsgFunction · 0.85
dwfGetDiscreteValueMethod · 0.45
testMethod · 0.45

Tested by

no test coverage detected