Fixed prosthesis not working correctly

This commit is contained in:
ZioPao
2024-05-05 00:47:50 +02:00
parent aadbe02df4
commit 5cc982188a
6 changed files with 40 additions and 24 deletions

View File

@@ -354,10 +354,20 @@ function LocalPlayerController.DropItemsAfterAmputation(limbName)
end
end
end
-- TODO Consider 2 handed weapons too
-- equipped items too
if side == "R" then
pl:setPrimaryHandItem(nil)
elseif side == "L" then
pl:setSecondaryHandItem(nil)
end
end
Events.OnAmputatedLimb.Add(LocalPlayerController.DropItemsAfterAmputation)
Events.OnProsthesisUnequipped.Add(LocalPlayerController.DropItemsAfterAmputation)