forked from mirrors/0ad
Do not send VisionRangeChanged messages when deserializing. Fixes #3075.
This was SVN commit r16401.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user