diff --git a/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp b/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp index 52695b056f..db003573e1 100644 --- a/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp +++ b/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp @@ -1628,6 +1628,18 @@ bool CStaticFunctionDefinitions::AttachElements(CElement* pElement, CElement* pA pElement->SetAttachedOffsets(vecPosition, vecRotation); pElement->AttachTo(pAttachedToElement); + if (IS_MARKER(pElement)) + { + CMarker* pMarker = static_cast(pElement); + CVector attachedPosition; + pMarker->GetAttachedPosition(attachedPosition); + pMarker->SetPosition(attachedPosition); + + CColShape* pColShape = pMarker->GetColShape(); + if (pColShape) + RefreshColShapeColliders(pColShape); + } + CBitStream BitStream; BitStream.pBitStream->Write(pAttachedToElement->GetID()); BitStream.pBitStream->Write(vecPosition.fX); @@ -1676,6 +1688,14 @@ bool CStaticFunctionDefinitions::DetachElements(CElement* pElement, CElement* pA pElement->AttachTo(NULL); pElement->GenerateSyncTimeContext(); + if (IS_MARKER(pElement)) + { + CMarker* pMarker = static_cast(pElement); + CColShape* pColShape = pMarker->GetColShape(); + if (pColShape) + RefreshColShapeColliders(pColShape); + } + CBitStream BitStream; BitStream.pBitStream->Write(pElement->GetSyncTimeContext()); BitStream.pBitStream->Write(vecPosition.fX);