Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/simulation2/components/CCmpObstruction.cpp
Show First 20 Lines • Show All 357 Lines • ▼ Show 20 Lines | virtual void HandleMessage(const CMessage& msg, bool UNUSED(global)) | ||||
case MT_Destroy: | case MT_Destroy: | ||||
{ | { | ||||
if (m_Tag.valid()) | if (m_Tag.valid()) | ||||
{ | { | ||||
CmpPtr<ICmpObstructionManager> cmpObstructionManager(GetSystemEntity()); | CmpPtr<ICmpObstructionManager> cmpObstructionManager(GetSystemEntity()); | ||||
if (!cmpObstructionManager) | if (!cmpObstructionManager) | ||||
break; // error | break; // error | ||||
// Deactivate the obstruction in case PositionChanged messages are sent after this. | |||||
m_Active = false; | |||||
cmpObstructionManager->RemoveShape(m_Tag); | cmpObstructionManager->RemoveShape(m_Tag); | ||||
m_Tag = tag_t(); | m_Tag = tag_t(); | ||||
if(m_Type == CLUSTER) | if(m_Type == CLUSTER) | ||||
RemoveClusterShapes(); | RemoveClusterShapes(); | ||||
} | } | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 461 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator