@quenty/ragdoll 15.23.3 → 15.23.4-canary.11a5dcf.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/package.json +32 -32
  3. package/src/Client/Classes/RagdollCameraShakeClient.lua +72 -64
  4. package/src/Client/Classes/RagdollClient.lua +1 -2
  5. package/src/Client/Classes/RagdollHumanoidOnDeathClient.lua +2 -2
  6. package/src/Client/Classes/RagdollHumanoidOnFallClient.lua +1 -1
  7. package/src/Client/Classes/RagdollableClient.lua +5 -5
  8. package/src/Client/RagdollBindersClient.lua +5 -5
  9. package/src/Client/RagdollServiceClient.lua +3 -3
  10. package/src/Server/Classes/Ragdoll.lua +3 -3
  11. package/src/Server/Classes/RagdollCameraShake.lua +2 -3
  12. package/src/Server/Classes/RagdollHumanoidOnDeath.lua +2 -2
  13. package/src/Server/Classes/RagdollHumanoidOnFall.lua +1 -2
  14. package/src/Server/Classes/Ragdollable.lua +7 -7
  15. package/src/Server/Classes/UnragdollAutomatically.lua +37 -35
  16. package/src/Server/Classes/UnragdollAutomaticallyConstants.lua +3 -3
  17. package/src/Server/RagdollBindersServer.lua +6 -6
  18. package/src/Server/RagdollService.lua +3 -3
  19. package/src/Shared/Classes/BindableRagdollHumanoidOnFall.lua +3 -5
  20. package/src/Shared/Classes/RagdollHumanoidOnFallConstants.lua +2 -2
  21. package/src/Shared/Classes/RagdollableBase.lua +1 -1
  22. package/src/Shared/Interfaces/RagdollableInterface.lua +7 -8
  23. package/src/Shared/RagdollServiceConstants.lua +2 -2
  24. package/src/Shared/Rigging/RagdollAdditionalAttachmentUtils.lua +44 -22
  25. package/src/Shared/Rigging/RagdollBallSocketUtils.lua +163 -163
  26. package/src/Shared/Rigging/RagdollCollisionUtils.lua +60 -61
  27. package/src/Shared/Rigging/RagdollMotorData.lua +3 -3
  28. package/src/Shared/Rigging/RagdollMotorLimitData.lua +78 -78
  29. package/src/Shared/Rigging/RagdollMotorUtils.lua +2 -2
  30. package/src/Shared/Rigging/RxRagdollUtils.lua +3 -3
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [15.23.4-canary.11a5dcf.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/ragdoll@15.23.3...@quenty/ragdoll@15.23.4-canary.11a5dcf.0) (2025-05-10)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Additional type checking updates ([05ba29a](https://github.com/Quenty/NevermoreEngine/commit/05ba29a03efc9f3feed74b34f1d9dfb237496214))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [15.23.3](https://github.com/Quenty/NevermoreEngine/compare/@quenty/ragdoll@15.23.2...@quenty/ragdoll@15.23.3) (2025-04-10)
7
18
 
8
19
  **Note:** Version bump only for package @quenty/ragdoll
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/ragdoll",
3
- "version": "15.23.3",
3
+ "version": "15.23.4-canary.11a5dcf.0",
4
4
  "description": "Quenty's Ragdoll system for Roblox - Floppy fun ragdolls",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -25,39 +25,39 @@
25
25
  "Quenty"
26
26
  ],
27
27
  "dependencies": {
28
- "@quenty/adorneedata": "^7.18.3",
29
- "@quenty/attributeutils": "^14.17.3",
30
- "@quenty/baseobject": "^10.8.3",
31
- "@quenty/binder": "^14.19.3",
32
- "@quenty/brio": "^14.17.3",
33
- "@quenty/camera": "^14.20.3",
34
- "@quenty/cancellabledelay": "^3.5.2",
35
- "@quenty/characterutils": "^12.18.3",
36
- "@quenty/draw": "^7.8.4",
37
- "@quenty/enumutils": "^3.4.2",
38
- "@quenty/hapticfeedbackutils": "^3.2.2",
39
- "@quenty/instanceutils": "^13.17.3",
40
- "@quenty/loader": "^10.8.3",
41
- "@quenty/maid": "^3.4.3",
42
- "@quenty/motor6d": "^7.20.3",
43
- "@quenty/physicsutils": "^8.17.3",
44
- "@quenty/playerhumanoidbinder": "^14.19.3",
45
- "@quenty/promise": "^10.10.4",
46
- "@quenty/qframe": "^10.10.4",
47
- "@quenty/r15utils": "^13.17.3",
48
- "@quenty/remoting": "^12.18.3",
49
- "@quenty/rx": "^13.17.3",
50
- "@quenty/rxbinderutils": "^14.19.3",
51
- "@quenty/rxsignal": "^7.17.3",
52
- "@quenty/spring": "^10.8.4",
53
- "@quenty/steputils": "^3.5.5",
54
- "@quenty/table": "^3.7.4",
55
- "@quenty/tie": "^10.20.3",
56
- "@quenty/valuebaseutils": "^13.17.3",
57
- "@quenty/valueobject": "^13.17.3"
28
+ "@quenty/adorneedata": "7.18.4-canary.11a5dcf.0",
29
+ "@quenty/attributeutils": "14.17.4-canary.11a5dcf.0",
30
+ "@quenty/baseobject": "10.8.4-canary.11a5dcf.0",
31
+ "@quenty/binder": "14.19.4-canary.11a5dcf.0",
32
+ "@quenty/brio": "14.17.4-canary.11a5dcf.0",
33
+ "@quenty/camera": "14.20.4-canary.11a5dcf.0",
34
+ "@quenty/cancellabledelay": "3.5.3-canary.11a5dcf.0",
35
+ "@quenty/characterutils": "12.18.4-canary.11a5dcf.0",
36
+ "@quenty/draw": "7.8.5-canary.11a5dcf.0",
37
+ "@quenty/enumutils": "3.4.2",
38
+ "@quenty/hapticfeedbackutils": "3.2.3-canary.11a5dcf.0",
39
+ "@quenty/instanceutils": "13.17.4-canary.11a5dcf.0",
40
+ "@quenty/loader": "10.8.4-canary.11a5dcf.0",
41
+ "@quenty/maid": "3.4.4-canary.11a5dcf.0",
42
+ "@quenty/motor6d": "7.20.4-canary.11a5dcf.0",
43
+ "@quenty/physicsutils": "8.17.4-canary.11a5dcf.0",
44
+ "@quenty/playerhumanoidbinder": "14.19.4-canary.11a5dcf.0",
45
+ "@quenty/promise": "10.10.5-canary.11a5dcf.0",
46
+ "@quenty/qframe": "10.10.5-canary.11a5dcf.0",
47
+ "@quenty/r15utils": "13.17.4-canary.11a5dcf.0",
48
+ "@quenty/remoting": "12.18.4-canary.11a5dcf.0",
49
+ "@quenty/rx": "13.17.4-canary.11a5dcf.0",
50
+ "@quenty/rxbinderutils": "14.19.4-canary.11a5dcf.0",
51
+ "@quenty/rxsignal": "7.17.4-canary.11a5dcf.0",
52
+ "@quenty/spring": "10.8.5-canary.11a5dcf.0",
53
+ "@quenty/steputils": "3.5.6-canary.11a5dcf.0",
54
+ "@quenty/table": "3.7.5-canary.11a5dcf.0",
55
+ "@quenty/tie": "10.20.4-canary.11a5dcf.0",
56
+ "@quenty/valuebaseutils": "13.17.4-canary.11a5dcf.0",
57
+ "@quenty/valueobject": "13.17.4-canary.11a5dcf.0"
58
58
  },
59
59
  "publishConfig": {
60
60
  "access": "public"
61
61
  },
62
- "gitHead": "b06c070ae91d5dab7bd8de6e290ad2caabb15d8f"
62
+ "gitHead": "11a5dcf7d4c7a0bfbf3337e97d30e8346ea09d3f"
63
63
  }
@@ -4,22 +4,22 @@
4
4
 
5
5
  local require = require(script.Parent.loader).load(script)
6
6
 
7
- local Workspace = game:GetService("Workspace")
8
- local UserInputService = game:GetService("UserInputService")
9
7
  local RunService = game:GetService("RunService")
8
+ local UserInputService = game:GetService("UserInputService")
9
+ local Workspace = game:GetService("Workspace")
10
10
 
11
11
  local BaseObject = require("BaseObject")
12
12
  local Binder = require("Binder")
13
13
  local CameraStackService = require("CameraStackService")
14
14
  local HapticFeedbackUtils = require("HapticFeedbackUtils")
15
15
  local Maid = require("Maid")
16
+ local RagdollClient = require("RagdollClient")
16
17
  local RagdollMotorUtils = require("RagdollMotorUtils")
17
18
  local RagdollServiceClient = require("RagdollServiceClient")
18
19
  local RxBrioUtils = require("RxBrioUtils")
19
20
  local RxCharacterUtils = require("RxCharacterUtils")
20
21
  local RxInstanceUtils = require("RxInstanceUtils")
21
22
  local RxR15Utils = require("RxR15Utils")
22
- local RagdollClient = require("RagdollClient")
23
23
 
24
24
  local RagdollCameraShakeClient = setmetatable({}, BaseObject)
25
25
  RagdollCameraShakeClient.ClassName = "RagdollCameraShakeClient"
@@ -34,25 +34,27 @@ function RagdollCameraShakeClient.new(humanoid: Humanoid, serviceBag)
34
34
  self._ragdollBinder = self._serviceBag:GetService(RagdollClient)
35
35
 
36
36
  -- While we've got a charater and we're ragdolled
37
- self._maid:GiveTask(RxCharacterUtils.observeIsOfLocalCharacterBrio(self._obj):Pipe({
38
- RxBrioUtils.switchMapBrio(function()
39
- return self._ragdollBinder:ObserveBrio(self._obj)
40
- end);
41
- }):Subscribe(function(brio)
42
- if brio:IsDead() then
43
- return
44
- end
37
+ self._maid:GiveTask(RxCharacterUtils.observeIsOfLocalCharacterBrio(self._obj)
38
+ :Pipe({
39
+ RxBrioUtils.switchMapBrio(function()
40
+ return self._ragdollBinder:ObserveBrio(self._obj)
41
+ end),
42
+ })
43
+ :Subscribe(function(brio)
44
+ if brio:IsDead() then
45
+ return
46
+ end
45
47
 
46
- local maid = brio:ToMaid()
48
+ local maid = brio:ToMaid()
47
49
 
48
- maid:GiveTask(task.spawn(function()
49
- -- Yield in the same way just to ensure no weird shakes.
50
- RagdollMotorUtils.yieldUntilStepped()
50
+ maid:GiveTask(task.spawn(function()
51
+ -- Yield in the same way just to ensure no weird shakes.
52
+ RagdollMotorUtils.yieldUntilStepped()
51
53
 
52
- maid:GiveTask(self:_setupHapticFeedback())
53
- maid:GiveTask(self:_setupCameraShake(self._cameraStackService:GetImpulseCamera()))
54
+ maid:GiveTask(self:_setupHapticFeedback())
55
+ maid:GiveTask(self:_setupCameraShake(self._cameraStackService:GetImpulseCamera()))
56
+ end))
54
57
  end))
55
- end))
56
58
 
57
59
  return self
58
60
  end
@@ -67,57 +69,63 @@ function RagdollCameraShakeClient:_setupCameraShake(impulseCamera)
67
69
 
68
70
  topMaid:GiveTask(RxInstanceUtils.observePropertyBrio(self._obj, "Parent", function(character)
69
71
  return character ~= nil
70
- end):Pipe({
71
- RxBrioUtils.switchMapBrio(function(character)
72
- return RxBrioUtils.flatCombineLatestBrio({
73
- upperTorso = RxR15Utils.observeCharacterPartBrio(character, "UpperTorso");
74
- head = RxR15Utils.observeCharacterPartBrio(character, "Head")
75
- }, function(state)
76
- return state.upperTorso and state.head
77
- end)
78
- end);
79
- }):Subscribe(function(brio)
80
- if brio:IsDead() then
81
- return
82
- end
83
-
84
- local maid = brio:ToMaid()
85
- local state = brio:GetValue()
86
-
87
- local function getEstimatedVelocityFromUpperTorso()
88
- -- TODO: Consider neck attachments
89
- local headOffset = state.upperTorso.Size*Vector3.new(0, 0.5, 0)
90
- + state.head.Size*Vector3.new(0, 0.5, 0)
91
- local headPosition = state.upperTorso.CFrame:PointToWorldSpace(headOffset)
92
-
93
- return state.upperTorso:GetVelocityAtPosition(headPosition)
94
- end
95
-
96
- local lastVelocity = getEstimatedVelocityFromUpperTorso()
97
- maid:GiveTask(RunService.Heartbeat:Connect(function()
98
- debug.profilebegin("ragdollcamerashake")
72
+ end)
73
+ :Pipe({
74
+ RxBrioUtils.switchMapBrio(function(character)
75
+ return RxBrioUtils.flatCombineLatestBrio({
76
+ upperTorso = RxR15Utils.observeCharacterPartBrio(character, "UpperTorso"),
77
+ head = RxR15Utils.observeCharacterPartBrio(character, "Head"),
78
+ }, function(state)
79
+ return state.upperTorso and state.head
80
+ end)
81
+ end),
82
+ })
83
+ :Subscribe(function(brio)
84
+ if brio:IsDead() then
85
+ return
86
+ end
99
87
 
100
- local cameraCFrame = Workspace.CurrentCamera.CFrame
88
+ local maid = brio:ToMaid()
89
+ local state = brio:GetValue()
101
90
 
102
- local velocity = getEstimatedVelocityFromUpperTorso()
103
- local dVelocity = velocity - lastVelocity
104
- if dVelocity.magnitude >= 0 then
105
- if self._ragdollServiceClient:GetScreenShakeEnabled() then
106
- -- Defaults, but we should tune these
107
- local speed = 20
108
- local damper = 0.5
91
+ local function getEstimatedVelocityFromUpperTorso()
92
+ -- TODO: Consider neck attachments
93
+ local headOffset = state.upperTorso.Size * Vector3.new(0, 0.5, 0)
94
+ + state.head.Size * Vector3.new(0, 0.5, 0)
95
+ local headPosition = state.upperTorso.CFrame:PointToWorldSpace(headOffset)
109
96
 
110
- speed = 40
111
- damper = 0.3
97
+ return state.upperTorso:GetVelocityAtPosition(headPosition)
98
+ end
112
99
 
113
- impulseCamera:Impulse(cameraCFrame:vectorToObjectSpace(-0.1*cameraCFrame.lookVector:Cross(dVelocity)), speed, damper)
100
+ local lastVelocity = getEstimatedVelocityFromUpperTorso()
101
+ maid:GiveTask(RunService.Heartbeat:Connect(function()
102
+ debug.profilebegin("ragdollcamerashake")
103
+
104
+ local cameraCFrame = Workspace.CurrentCamera.CFrame
105
+
106
+ local velocity = getEstimatedVelocityFromUpperTorso()
107
+ local dVelocity = velocity - lastVelocity
108
+ if dVelocity.magnitude >= 0 then
109
+ if self._ragdollServiceClient:GetScreenShakeEnabled() then
110
+ -- Defaults, but we should tune these
111
+ local speed = 20
112
+ local damper = 0.5
113
+
114
+ speed = 40
115
+ damper = 0.3
116
+
117
+ impulseCamera:Impulse(
118
+ cameraCFrame:vectorToObjectSpace(-0.1 * cameraCFrame.lookVector:Cross(dVelocity)),
119
+ speed,
120
+ damper
121
+ )
122
+ end
114
123
  end
115
- end
116
124
 
117
- lastVelocity = velocity
118
- debug.profileend()
125
+ lastVelocity = velocity
126
+ debug.profileend()
127
+ end))
119
128
  end))
120
- end))
121
129
 
122
130
  return topMaid
123
131
  end
@@ -131,7 +139,7 @@ function RagdollCameraShakeClient:_setupHapticFeedback()
131
139
  end
132
140
 
133
141
  maid:GiveTask(task.spawn(function()
134
- for i=1, 0, -0.1 do
142
+ for i = 1, 0, -0.1 do
135
143
  HapticFeedbackUtils.setSmallVibration(lastInputType, i)
136
144
  task.wait(0.05)
137
145
  end
@@ -146,4 +154,4 @@ function RagdollCameraShakeClient:_setupHapticFeedback()
146
154
  return maid
147
155
  end
148
156
 
149
- return Binder.new("RagdollCameraShake", RagdollCameraShakeClient)
157
+ return Binder.new("RagdollCameraShake", RagdollCameraShakeClient)
@@ -16,7 +16,6 @@
16
16
 
17
17
  local require = require(script.Parent.loader).load(script)
18
18
 
19
-
20
19
  local BaseObject = require("BaseObject")
21
20
  local Binder = require("Binder")
22
21
 
@@ -38,4 +37,4 @@ function RagdollClient.new(humanoid, serviceBag)
38
37
  return self
39
38
  end
40
39
 
41
- return Binder.new("Ragdoll", RagdollClient)
40
+ return Binder.new("Ragdoll", RagdollClient)
@@ -7,8 +7,8 @@
7
7
 
8
8
  local require = require(script.Parent.loader).load(script)
9
9
 
10
- local RunService = game:GetService("RunService")
11
10
  local Players = game:GetService("Players")
11
+ local RunService = game:GetService("RunService")
12
12
  local Workspace = game:GetService("Workspace")
13
13
 
14
14
  local BaseObject = require("BaseObject")
@@ -96,4 +96,4 @@ function RagdollHumanoidOnDeathClient.disableParticleEmittersAndFadeOutYielding(
96
96
  end
97
97
  end
98
98
 
99
- return Binder.new("RagdollHumanoidOnDeath", RagdollHumanoidOnDeathClient)
99
+ return Binder.new("RagdollHumanoidOnDeath", RagdollHumanoidOnDeathClient)
@@ -55,4 +55,4 @@ function RagdollHumanoidOnFallClient:_update()
55
55
  end
56
56
  end
57
57
 
58
- return Binder.new("RagdollHumanoidOnFall", RagdollHumanoidOnFallClient)
58
+ return Binder.new("RagdollHumanoidOnFall", RagdollHumanoidOnFallClient)
@@ -7,12 +7,12 @@
7
7
 
8
8
  local require = require(script.Parent.loader).load(script)
9
9
 
10
- local RagdollableBase = require("RagdollableBase")
11
- local RagdollClient = require("RagdollClient")
12
- local RxRagdollUtils = require("RxRagdollUtils")
13
10
  local Binder = require("Binder")
11
+ local RagdollClient = require("RagdollClient")
12
+ local RagdollableBase = require("RagdollableBase")
14
13
  local RagdollableInterface = require("RagdollableInterface")
15
14
  local Rx = require("Rx")
15
+ local RxRagdollUtils = require("RxRagdollUtils")
16
16
 
17
17
  local RagdollableClient = setmetatable({}, RagdollableBase)
18
18
  RagdollableClient.ClassName = "RagdollableClient"
@@ -43,7 +43,7 @@ function RagdollableClient:ObserveIsRagdolled()
43
43
  return self._ragdollBinder:Observe(self._obj):Pipe({
44
44
  Rx.map(function(value)
45
45
  return value and true or false
46
- end)
46
+ end),
47
47
  })
48
48
  end
49
49
 
@@ -55,4 +55,4 @@ function RagdollableClient:_onRagdollChanged(ragdoll)
55
55
  end
56
56
  end
57
57
 
58
- return Binder.new("Ragdollable", RagdollableClient)
58
+ return Binder.new("Ragdollable", RagdollableClient)
@@ -17,7 +17,7 @@ local require = require(script.Parent.loader).load(script)
17
17
  local BinderProvider = require("BinderProvider")
18
18
 
19
19
  return BinderProvider.new(script.Name, function(self, serviceBag)
20
- --[=[
20
+ --[=[
21
21
  Apply this binder to a humanoid to ragdoll it. Humanoid must already have [Ragdollable] defined.
22
22
 
23
23
  ```lua
@@ -33,24 +33,24 @@ return BinderProvider.new(script.Name, function(self, serviceBag)
33
33
  ]=]
34
34
  self:Add(serviceBag:GetService(require("RagdollClient")))
35
35
 
36
- --[=[
36
+ --[=[
37
37
  Enables ragdolling on a humanoid.
38
38
  @prop Ragdollable Binder<RagdollableClient>
39
39
  @within RagdollBindersClient
40
40
  ]=]
41
41
  self:Add(serviceBag:GetService(require("RagdollableClient")))
42
42
 
43
- --[=[
43
+ --[=[
44
44
  Automatically applies ragdoll upon humanoid death.
45
45
  @prop RagdollaRagdollHumanoidOnDeathble Binder<RagdollHumanoidOnDeathClient>
46
46
  @within RagdollBindersClient
47
47
  ]=]
48
48
  self:Add(serviceBag:GetService(require("RagdollHumanoidOnDeathClient")))
49
49
 
50
- --[=[
50
+ --[=[
51
51
  Automatically applies ragdoll upon humanoid fall.
52
52
  @prop RagdollHumanoidOnFall Binder<RagdollHumanoidOnFallClient>
53
53
  @within RagdollBindersClient
54
54
  ]=]
55
55
  self:Add(serviceBag:GetService(require("RagdollHumanoidOnFallClient")))
56
- end)
56
+ end)
@@ -10,7 +10,7 @@ local require = require(script.Parent.loader).load(script)
10
10
  local AttributeValue = require("AttributeValue")
11
11
 
12
12
  local Players = game:GetService("Players")
13
- local _ServiceBag = require("ServiceBag")
13
+ local ServiceBag = require("ServiceBag")
14
14
 
15
15
  local RagdollServiceClient = {}
16
16
  RagdollServiceClient.ServiceName = "RagdollServiceClient"
@@ -19,7 +19,7 @@ RagdollServiceClient.ServiceName = "RagdollServiceClient"
19
19
  Initializes the ragdoll service on the client. Should be done via [ServiceBag].
20
20
  @param serviceBag ServiceBag
21
21
  ]=]
22
- function RagdollServiceClient:Init(serviceBag: _ServiceBag.ServiceBag)
22
+ function RagdollServiceClient:Init(serviceBag: ServiceBag.ServiceBag)
23
23
  assert(not self._serviceBag, "Already initialized")
24
24
  self._serviceBag = assert(serviceBag, "No serviceBag")
25
25
 
@@ -58,4 +58,4 @@ function RagdollServiceClient:GetScreenShakeEnabled()
58
58
  return self._screenShakeEnabled.Value
59
59
  end
60
60
 
61
- return RagdollServiceClient
61
+ return RagdollServiceClient
@@ -31,7 +31,7 @@ local require = require(script.Parent.loader).load(script)
31
31
 
32
32
  local BaseObject = require("BaseObject")
33
33
  local Binder = require("Binder")
34
- local _ServiceBag = require("ServiceBag")
34
+ local ServiceBag = require("ServiceBag")
35
35
 
36
36
  local Ragdoll = setmetatable({}, BaseObject)
37
37
  Ragdoll.ClassName = "Ragdoll"
@@ -43,10 +43,10 @@ Ragdoll.__index = Ragdoll
43
43
  @param _serviceBag ServiceBag
44
44
  @return Ragdoll
45
45
  ]=]
46
- function Ragdoll.new(humanoid: Humanoid, _serviceBag: _ServiceBag.ServiceBag)
46
+ function Ragdoll.new(humanoid: Humanoid, _serviceBag: ServiceBag.ServiceBag)
47
47
  local self = setmetatable(BaseObject.new(humanoid), Ragdoll)
48
48
 
49
49
  return self
50
50
  end
51
51
 
52
- return Binder.new("Ragdoll", Ragdoll)
52
+ return Binder.new("Ragdoll", Ragdoll)
@@ -7,8 +7,8 @@
7
7
  local require = require(script.Parent.loader).load(script)
8
8
 
9
9
  local BaseObject = require("BaseObject")
10
- local Ragdoll = require("Ragdoll")
11
10
  local PlayerHumanoidBinder = require("PlayerHumanoidBinder")
11
+ local Ragdoll = require("Ragdoll")
12
12
 
13
13
  local RagdollCameraShake = setmetatable({}, BaseObject)
14
14
  RagdollCameraShake.ClassName = "RagdollCameraShake"
@@ -26,8 +26,7 @@ function RagdollCameraShake.new(humanoid: Humanoid, serviceBag)
26
26
  self._serviceBag = assert(serviceBag, "Bad serviceBag")
27
27
  self._ragdollBinder = self._serviceBag:GetService(Ragdoll)
28
28
 
29
-
30
29
  return self
31
30
  end
32
31
 
33
- return PlayerHumanoidBinder.new("RagdollCameraShake", RagdollCameraShake)
32
+ return PlayerHumanoidBinder.new("RagdollCameraShake", RagdollCameraShake)
@@ -7,8 +7,8 @@
7
7
  local require = require(script.Parent.loader).load(script)
8
8
 
9
9
  local BaseObject = require("BaseObject")
10
- local Ragdoll = require("Ragdoll")
11
10
  local PlayerHumanoidBinder = require("PlayerHumanoidBinder")
11
+ local Ragdoll = require("Ragdoll")
12
12
 
13
13
  local RagdollHumanoidOnDeath = setmetatable({}, BaseObject)
14
14
  RagdollHumanoidOnDeath.ClassName = "RagdollHumanoidOnDeath"
@@ -40,4 +40,4 @@ function RagdollHumanoidOnDeath.new(humanoid, serviceBag)
40
40
  return self
41
41
  end
42
42
 
43
- return PlayerHumanoidBinder.new("RagdollHumanoidOnDeath", RagdollHumanoidOnDeath)
43
+ return PlayerHumanoidBinder.new("RagdollHumanoidOnDeath", RagdollHumanoidOnDeath)
@@ -45,7 +45,6 @@ function RagdollHumanoidOnFall.new(humanoid, serviceBag)
45
45
  self:_handleServerEvent(...)
46
46
  end))
47
47
  else
48
-
49
48
  self._maid:GiveTask(self:_getOrCreateRagdollLogic().ShouldRagdoll.Changed:Connect(function()
50
49
  self:_update()
51
50
  end))
@@ -90,4 +89,4 @@ function RagdollHumanoidOnFall:_update()
90
89
  end
91
90
  end
92
91
 
93
- return PlayerHumanoidBinder.new("RagdollHumanoidOnFall", RagdollHumanoidOnFall)
92
+ return PlayerHumanoidBinder.new("RagdollHumanoidOnFall", RagdollHumanoidOnFall)
@@ -6,7 +6,6 @@
6
6
 
7
7
  local require = require(script.Parent.loader).load(script)
8
8
 
9
- local RagdollableBase = require("RagdollableBase")
10
9
  local Maid = require("Maid")
11
10
  local Motor6DStackHumanoid = require("Motor6DStackHumanoid")
12
11
  local PlayerHumanoidBinder = require("PlayerHumanoidBinder")
@@ -15,10 +14,11 @@ local RagdollAdditionalAttachmentUtils = require("RagdollAdditionalAttachmentUti
15
14
  local RagdollBallSocketUtils = require("RagdollBallSocketUtils")
16
15
  local RagdollCollisionUtils = require("RagdollCollisionUtils")
17
16
  local RagdollMotorUtils = require("RagdollMotorUtils")
18
- local RxBrioUtils = require("RxBrioUtils")
19
- local RxRagdollUtils = require("RxRagdollUtils")
17
+ local RagdollableBase = require("RagdollableBase")
20
18
  local RagdollableInterface = require("RagdollableInterface")
21
19
  local Rx = require("Rx")
20
+ local RxBrioUtils = require("RxBrioUtils")
21
+ local RxRagdollUtils = require("RxRagdollUtils")
22
22
 
23
23
  local Ragdollable = setmetatable({}, RagdollableBase)
24
24
  Ragdollable.ClassName = "Ragdollable"
@@ -41,8 +41,8 @@ function Ragdollable.new(humanoid, serviceBag)
41
41
  -- Ensure predefined physics rig immediatelly on the server.
42
42
  -- We do this so during replication loop-back there's no chance of death.
43
43
  self._maid:GiveTask(RxBrioUtils.flatCombineLatest({
44
- character = RxRagdollUtils.observeCharacterBrio(self._obj);
45
- rigType = RxRagdollUtils.observeRigType(self._obj);
44
+ character = RxRagdollUtils.observeCharacterBrio(self._obj),
45
+ rigType = RxRagdollUtils.observeRigType(self._obj),
46
46
  }):Subscribe(function(state)
47
47
  if state.character and state.rigType then
48
48
  local maid = Maid.new()
@@ -74,7 +74,7 @@ function Ragdollable:ObserveIsRagdolled()
74
74
  return self._ragdollBinder:Observe(self._obj):Pipe({
75
75
  Rx.map(function(value)
76
76
  return value and true or false
77
- end)
77
+ end),
78
78
  })
79
79
  end
80
80
 
@@ -98,4 +98,4 @@ function Ragdollable:_setRagdollEnabled(isEnabled)
98
98
  end
99
99
  end
100
100
 
101
- return PlayerHumanoidBinder.new("Ragdollable", Ragdollable)
101
+ return PlayerHumanoidBinder.new("Ragdollable", Ragdollable)