mirror of
https://github.com/ACF-Team/CFW.git
synced 2025-03-04 03:03:16 -05:00
Added a connection check before attempting to disconnect
- CFW.disconnect will now actually check if both entities are connected before doing anything.
This commit is contained in:
parent
839af48129
commit
2aafe1b6b6
@ -65,7 +65,10 @@ end
|
||||
function CFW.disconnect(entA, indexB)
|
||||
if entA:EntIndex() == indexB then return end -- Should not happen normally, but ragdolls allow you to constrain to other bones on the same ragdoll, and it is the same entity
|
||||
|
||||
local link = entA._links[indexB]
|
||||
local link = entA._links[indexB]
|
||||
|
||||
if not link then return end -- There's nothing to disconnect here
|
||||
|
||||
local contraptionPopped = link:Sub()
|
||||
|
||||
if contraptionPopped then return end
|
||||
|
Loading…
Reference in New Issue
Block a user