Fix Hash Collisions in CDBehaviorParameter table (#930)

* Fix hashing

* Update CDBehaviorParameterTable.cpp
This commit is contained in:
David Markowitz
2022-12-29 01:43:52 -08:00
committed by GitHub
parent 99c0ca253c
commit bd28e4051f
3 changed files with 25 additions and 30 deletions

View File

@@ -439,7 +439,7 @@ Behavior::Behavior(const uint32_t behaviorId) {
float Behavior::GetFloat(const std::string& name, const float defaultValue) const {
// Get the behavior parameter entry and return its value.
if (!BehaviorParameterTable) BehaviorParameterTable = CDClientManager::Instance()->GetTable<CDBehaviorParameterTable>("BehaviorParameter");
return BehaviorParameterTable->GetEntry(this->m_behaviorId, name, defaultValue).value;
return BehaviorParameterTable->GetValue(this->m_behaviorId, name, defaultValue);
}