mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-20 00:02:55 +00:00
Fix considering string static value to not be true for visible expressions
This commit is contained in:
parent
b8b4b7ce21
commit
5ee5056c5d
@ -502,7 +502,7 @@ namespace IW4
|
||||
{
|
||||
const auto* staticValue = dynamic_cast<const SimpleExpressionValue*>(expression);
|
||||
isStatic = staticValue != nullptr;
|
||||
isTruthy = isStatic && staticValue->IsTruthy();
|
||||
isTruthy = isStatic && (staticValue->m_type == SimpleExpressionValue::Type::INT || staticValue->m_type == SimpleExpressionValue::Type::DOUBLE) && staticValue->IsTruthy();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -504,7 +504,7 @@ namespace IW5
|
||||
{
|
||||
const auto* staticValue = dynamic_cast<const SimpleExpressionValue*>(expression);
|
||||
isStatic = staticValue != nullptr;
|
||||
isTruthy = isStatic && staticValue->IsTruthy();
|
||||
isTruthy = isStatic && (staticValue->m_type == SimpleExpressionValue::Type::INT || staticValue->m_type == SimpleExpressionValue::Type::DOUBLE) && staticValue->IsTruthy();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -663,7 +663,8 @@ namespace IW5
|
||||
return outputSet;
|
||||
}
|
||||
|
||||
_NODISCARD ItemKeyHandler* ConvertKeyHandler(const std::multimap<int, std::unique_ptr<CommonEventHandlerSet>>& keyHandlers, const CommonMenuDef* menu, const CommonItemDef* item = nullptr) const
|
||||
_NODISCARD ItemKeyHandler* ConvertKeyHandler(const std::multimap<int, std::unique_ptr<CommonEventHandlerSet>>& keyHandlers, const CommonMenuDef* menu,
|
||||
const CommonItemDef* item = nullptr) const
|
||||
{
|
||||
if (keyHandlers.empty())
|
||||
return nullptr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user