1
0
forked from mirrors/0ad

Do not send VisionRangeChanged messages when deserializing. Fixes #3075.

This was SVN commit r16401.
This commit is contained in:
leper
2015-03-03 01:59:42 +00:00
parent 7901f4087d
commit 2b5de1df93
+11 -4
View File
@@ -76,11 +76,11 @@ public:
const CMessageValueModification& msgData = static_cast<const CMessageValueModification&> (msg);
if (msgData.component != L"Vision")
break;
}
// fall-through
case MT_Deserialized:
{
CmpPtr<ICmpValueModificationManager> cmpValueModificationManager(GetSystemEntity());
if (!cmpValueModificationManager)
break;
entity_pos_t newRange = cmpValueModificationManager->ApplyModifications(L"Vision/Range", m_BaseRange, GetEntityId());
if (newRange == m_Range)
break;
@@ -92,6 +92,13 @@ public:
GetSimContext().GetComponentManager().BroadcastMessage(msg);
break;
}
case MT_Deserialized:
{
CmpPtr<ICmpValueModificationManager> cmpValueModificationManager(GetSystemEntity());
if (cmpValueModificationManager)
m_Range = cmpValueModificationManager->ApplyModifications(L"Vision/Range", m_BaseRange, GetEntityId());
break;
}
}
}