File tree Expand file tree Collapse file tree 1 file changed +33
-8
lines changed
Server/mods/deathmatch/logic Expand file tree Collapse file tree 1 file changed +33
-8
lines changed Original file line number Diff line number Diff line change @@ -12567,12 +12567,37 @@ bool CStaticFunctionDefinitions::SpawnVehicleFlyingComponent(CVehicle* const veh
1256712567}
1256812568
1256912569bool CStaticFunctionDefinitions::SetElementCollidableWith (CElement* element, CElement* withElement, bool canCollide)
12570- {
12571- CBitStream BitStream;
12572- BitStream.pBitStream ->Write (withElement->GetID ());
12573- BitStream.pBitStream ->WriteBit (canCollide);
12574-
12575- m_pPlayerManager->BroadcastOnlyJoined (CElementRPCPacket (element, SET_ELEMENT_COLLIDABLE_WITH, *BitStream.pBitStream ));
12570+ {
12571+ switch (element->GetType ())
12572+ {
12573+ case EElementType::PLAYER:
12574+ case EElementType::PED:
12575+ case EElementType::OBJECT:
12576+ case EElementType::WEAPON:
12577+ case EElementType::VEHICLE:
12578+ {
12579+ switch (withElement->GetType ())
12580+ {
12581+ case EElementType::PLAYER:
12582+ case EElementType::PED:
12583+ case EElementType::OBJECT:
12584+ case EElementType::WEAPON:
12585+ case EElementType::VEHICLE:
12586+ {
12587+ CBitStream BitStream;
12588+ BitStream.pBitStream ->Write (withElement->GetID ());
12589+ BitStream.pBitStream ->WriteBit (canCollide);
12590+ m_pPlayerManager->BroadcastOnlyJoined (CElementRPCPacket (element, SET_ELEMENT_COLLIDABLE_WITH, *BitStream.pBitStream ));
12591+ return true ;
12592+ }
12593+ default :
12594+ break ;
12595+ }
12596+ break ;
12597+ }
12598+ default :
12599+ break ;
12600+ }
1257612601
12577- return true ;
12578- }
12602+ return false ;
12603+ }
You can’t perform that action at this time.
0 commit comments