diff --git a/source/simulation2/components/CCmpVision.cpp b/source/simulation2/components/CCmpVision.cpp index eb2f6ad430..c058270573 100644 --- a/source/simulation2/components/CCmpVision.cpp +++ b/source/simulation2/components/CCmpVision.cpp @@ -76,11 +76,11 @@ public: const CMessageValueModification& msgData = static_cast (msg); if (msgData.component != L"Vision") break; - } - // fall-through - case MT_Deserialized: - { + CmpPtr 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 cmpValueModificationManager(GetSystemEntity()); + if (cmpValueModificationManager) + m_Range = cmpValueModificationManager->ApplyModifications(L"Vision/Range", m_BaseRange, GetEntityId()); + break; + } } }