Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/simulation2/components/CCmpUnitMotion.cpp
Show First 20 Lines • Show All 402 Lines • ▼ Show 20 Lines | case MT_PathResult: | ||||
PathResult(msgData.ticket, msgData.path); | PathResult(msgData.ticket, msgData.path); | ||||
break; | break; | ||||
} | } | ||||
case MT_ValueModification: | case MT_ValueModification: | ||||
{ | { | ||||
const CMessageValueModification& msgData = static_cast<const CMessageValueModification&> (msg); | const CMessageValueModification& msgData = static_cast<const CMessageValueModification&> (msg); | ||||
if (msgData.component != L"UnitMotion") | if (msgData.component != L"UnitMotion") | ||||
break; | break; | ||||
FALLTHROUGH; | |||||
} | } | ||||
// fall-through | |||||
case MT_OwnershipChanged: | case MT_OwnershipChanged: | ||||
case MT_Deserialized: | case MT_Deserialized: | ||||
{ | { | ||||
CmpPtr<ICmpValueModificationManager> cmpValueModificationManager(GetSystemEntity()); | CmpPtr<ICmpValueModificationManager> cmpValueModificationManager(GetSystemEntity()); | ||||
if (!cmpValueModificationManager) | if (!cmpValueModificationManager) | ||||
break; | break; | ||||
fixed newWalkSpeed = cmpValueModificationManager->ApplyModifications(L"UnitMotion/WalkSpeed", m_OriginalWalkSpeed, GetEntityId()); | fixed newWalkSpeed = cmpValueModificationManager->ApplyModifications(L"UnitMotion/WalkSpeed", m_OriginalWalkSpeed, GetEntityId()); | ||||
▲ Show 20 Lines • Show All 1,391 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator