void SetValue(IEntity* const pEntity, float const fValue) { // Don't optimize here! // We always need to set the value as it could have been manipulated by another entity. m_fValue = fValue; if (pEntity != NULL) { SetOnProxy(pEntity, m_fValue); } else { SetOnGlobalObject(m_fValue); } }
void SetValue(IEntity* const pEntity, float const fValue, bool const bForceSet = false) { if (abs(fValue-m_fValue) > EPSILON || bForceSet) { m_fValue = fValue; if (pEntity != NULL) { SetOnProxy(pEntity, m_fValue); } else { SetOnGlobalObject(m_fValue); } } }