diff --git a/source/simulation2/system/ComponentManager.cpp b/source/simulation2/system/ComponentManager.cpp
index 989d12e80d..34a5e7094f 100644
--- a/source/simulation2/system/ComponentManager.cpp
+++ b/source/simulation2/system/ComponentManager.cpp
@@ -1104,28 +1104,16 @@ void CComponentManager::SendGlobalMessage(entity_id_t ent, const CMessage& msg)
std::string CComponentManager::GenerateSchema() const
{
- std::string numericOperation =
- ""
- ""
- ""
- "add"
- "mul"
- ""
- ""
- "";
std::string schema =
""
""
""
- + numericOperation +
""
""
"0"
- + numericOperation +
""
""
"0"
- + numericOperation +
""
""
""
diff --git a/source/simulation2/system/ParamNode.cpp b/source/simulation2/system/ParamNode.cpp
index 0fbb4fc7de..715bc08600 100644
--- a/source/simulation2/system/ParamNode.cpp
+++ b/source/simulation2/system/ParamNode.cpp
@@ -83,7 +83,8 @@ void CParamNode::ApplyLayer(const XMBFile& xmb, const XMBElement& element, const
enum op {
INVALID,
ADD,
- MUL
+ MUL,
+ MUL_ROUND
} op = INVALID;
bool replacing = false;
bool filtering = false;
@@ -117,6 +118,8 @@ void CParamNode::ApplyLayer(const XMBFile& xmb, const XMBElement& element, const
op = ADD;
else if (std::wstring(attr.Value.begin(), attr.Value.end()) == L"mul")
op = MUL;
+ else if (std::wstring(attr.Value.begin(), attr.Value.end()) == L"mul_round")
+ op = MUL_ROUND;
else
LOGWARNING("Invalid op '%ls'", attr.Value);
}
@@ -178,7 +181,10 @@ void CParamNode::ApplyLayer(const XMBFile& xmb, const XMBElement& element, const
node.m_Value = (oldval + mod).ToString().FromUTF8();
break;
case MUL:
- node.m_Value = (oldval.Multiply(mod)).ToString().FromUTF8();
+ node.m_Value = oldval.Multiply(mod).ToString().FromUTF8();
+ break;
+ case MUL_ROUND:
+ node.m_Value = fixed::FromInt(oldval.Multiply(mod).ToInt_RoundToNearest()).ToString().FromUTF8();
break;
}
hasSetValue = true;