Fix BBParam.get_value() not always returning proper default

This commit is contained in:
Serhii Snitsaruk 2023-09-02 14:12:24 +02:00
parent 76689659f7
commit 16b25fa760
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ Variant BBParam::get_value(Object *p_agent, const Ref<Blackboard> &p_blackboard,
if (value_source == SAVED_VALUE) {
return saved_value;
} else {
ERR_FAIL_COND_V_MSG(!p_blackboard->has_var(variable), Variant(), vformat("BBParam: Blackboard variable doesn't exist: \"%s\".", p_default));
ERR_FAIL_COND_V_MSG(!p_blackboard->has_var(variable), p_default, vformat("BBParam: Blackboard variable doesn't exist: \"%s\".", p_default));
return p_blackboard->get_var(variable, p_default);
}
}