@quenty/ragdoll 15.6.1 → 15.7.0-canary.478.211e09e.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.
package/CHANGELOG.md CHANGED
@@ -3,9 +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.6.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/ragdoll@15.6.0...@quenty/ragdoll@15.6.1) (2024-07-16)
6
+ # [15.7.0-canary.478.211e09e.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/ragdoll@15.6.0...@quenty/ragdoll@15.7.0-canary.478.211e09e.0) (2024-08-27)
7
7
 
8
- **Note:** Version bump only for package @quenty/ragdoll
8
+
9
+ ### Bug Fixes
10
+
11
+ * Upgrade ragdoll to support humanoid state machine off ([fed4769](https://github.com/Quenty/NevermoreEngine/commit/fed47690c13fdda689b80158cf9f28c8a3a00a47))
12
+
13
+
14
+ ### Features
15
+
16
+ * Declare tie interface we're implementing ([e7150c1](https://github.com/Quenty/NevermoreEngine/commit/e7150c13a685ce88db9c1280a14841c81191a40a))
9
17
 
10
18
 
11
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/ragdoll",
3
- "version": "15.6.1",
3
+ "version": "15.7.0-canary.478.211e09e.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.4.0",
29
- "@quenty/attributeutils": "^14.3.0",
30
- "@quenty/baseobject": "^10.3.0",
31
- "@quenty/binder": "^14.4.0",
32
- "@quenty/brio": "^14.3.0",
33
- "@quenty/camera": "^14.5.1",
34
- "@quenty/cancellabledelay": "^3.5.0",
35
- "@quenty/characterutils": "^12.3.0",
36
- "@quenty/draw": "^7.3.0",
37
- "@quenty/enumutils": "^3.2.0",
38
- "@quenty/hapticfeedbackutils": "^3.2.0",
39
- "@quenty/instanceutils": "^13.3.0",
40
- "@quenty/loader": "^10.3.0",
41
- "@quenty/maid": "^3.2.0",
42
- "@quenty/motor6d": "^7.5.0",
43
- "@quenty/physicsutils": "^8.3.0",
44
- "@quenty/playerhumanoidbinder": "^14.4.0",
45
- "@quenty/promise": "^10.3.0",
46
- "@quenty/qframe": "^10.3.0",
47
- "@quenty/r15utils": "^13.3.0",
48
- "@quenty/remoting": "^12.4.0",
49
- "@quenty/rx": "^13.3.0",
50
- "@quenty/rxbinderutils": "^14.4.0",
51
- "@quenty/rxsignal": "^7.3.0",
52
- "@quenty/spring": "^10.3.0",
53
- "@quenty/steputils": "^3.4.0",
54
- "@quenty/table": "^3.5.0",
55
- "@quenty/tie": "^10.5.0",
56
- "@quenty/valuebaseutils": "^13.3.0",
57
- "@quenty/valueobject": "^13.3.0"
28
+ "@quenty/adorneedata": "7.5.0-canary.478.211e09e.0",
29
+ "@quenty/attributeutils": "14.4.0-canary.478.211e09e.0",
30
+ "@quenty/baseobject": "10.4.0-canary.478.211e09e.0",
31
+ "@quenty/binder": "14.5.0-canary.478.211e09e.0",
32
+ "@quenty/brio": "14.4.0-canary.478.211e09e.0",
33
+ "@quenty/camera": "14.6.0-canary.478.211e09e.0",
34
+ "@quenty/cancellabledelay": "3.5.0",
35
+ "@quenty/characterutils": "12.4.0-canary.478.211e09e.0",
36
+ "@quenty/draw": "7.4.0-canary.478.211e09e.0",
37
+ "@quenty/enumutils": "3.2.0",
38
+ "@quenty/hapticfeedbackutils": "3.2.0",
39
+ "@quenty/instanceutils": "13.4.0-canary.478.211e09e.0",
40
+ "@quenty/loader": "10.4.0-canary.478.211e09e.0",
41
+ "@quenty/maid": "3.2.0",
42
+ "@quenty/motor6d": "7.6.0-canary.478.211e09e.0",
43
+ "@quenty/physicsutils": "8.4.0-canary.478.211e09e.0",
44
+ "@quenty/playerhumanoidbinder": "14.5.0-canary.478.211e09e.0",
45
+ "@quenty/promise": "10.4.0-canary.478.211e09e.0",
46
+ "@quenty/qframe": "10.4.0-canary.478.211e09e.0",
47
+ "@quenty/r15utils": "13.4.0-canary.478.211e09e.0",
48
+ "@quenty/remoting": "12.5.0-canary.478.211e09e.0",
49
+ "@quenty/rx": "13.4.0-canary.478.211e09e.0",
50
+ "@quenty/rxbinderutils": "14.5.0-canary.478.211e09e.0",
51
+ "@quenty/rxsignal": "7.4.0-canary.478.211e09e.0",
52
+ "@quenty/spring": "10.4.0-canary.478.211e09e.0",
53
+ "@quenty/steputils": "3.4.0",
54
+ "@quenty/table": "3.5.0",
55
+ "@quenty/tie": "10.6.0-canary.478.211e09e.0",
56
+ "@quenty/valuebaseutils": "13.4.0-canary.478.211e09e.0",
57
+ "@quenty/valueobject": "13.4.0-canary.478.211e09e.0"
58
58
  },
59
59
  "publishConfig": {
60
60
  "access": "public"
61
61
  },
62
- "gitHead": "d9ffcf779b43c299fbb2dd0bd15d56b83b3e5043"
62
+ "gitHead": "211e09ec811d87f8ad4596230f8ee53f81eb6eaa"
63
63
  }
@@ -34,7 +34,7 @@ function RagdollableClient.new(humanoid, serviceBag)
34
34
  self:_onRagdollChanged(ragdoll)
35
35
  end))
36
36
 
37
- self._maid:GiveTask(RagdollableInterface:Implement(self._obj, self))
37
+ self._maid:GiveTask(RagdollableInterface.Client:Implement(self._obj, self))
38
38
 
39
39
  return self
40
40
  end
@@ -65,7 +65,7 @@ function Ragdollable.new(humanoid, serviceBag)
65
65
  end))
66
66
  self:_onRagdollChanged()
67
67
 
68
- self._maid:GiveTask(RagdollableInterface:Implement(self._obj, self))
68
+ self._maid:GiveTask(RagdollableInterface.Server:Implement(self._obj, self))
69
69
 
70
70
  return self
71
71
  end
@@ -168,7 +168,7 @@ end
168
168
  function RagdollMotorUtils.setupRagdollRootPartMotor(motor, part0, part1)
169
169
  local maid = Maid.new()
170
170
 
171
- local ragdollMotorData = RagdollMotorData:CreateValue(motor)
171
+ local ragdollMotorData = RagdollMotorData:Create(motor)
172
172
 
173
173
  local lastTransformSpring = Spring.new(QFrame.fromCFrameClosestTo(motor.Transform, QFrame.new()))
174
174
  lastTransformSpring.t = QFrame.new()
@@ -257,7 +257,7 @@ function RagdollMotorUtils.setupRagdollMotor(motor, part0, part1)
257
257
  maid:GiveTask(function()
258
258
  local implemention = Motor6DStackInterface:FindFirstImplementation(motor)
259
259
  if implemention then
260
- local ragdollMotorData = RagdollMotorData:CreateValue(motor)
260
+ local ragdollMotorData = RagdollMotorData:Create(motor)
261
261
  local initialTransform = (part0.CFrame * motor.C0):toObjectSpace(part1.CFrame * motor.C1)
262
262
  local speed = ragdollMotorData.RagdollSpringReturnSpeed.Value
263
263
 
@@ -279,7 +279,7 @@ function RagdollMotorUtils.suppressJustRootPart(character, rigType)
279
279
 
280
280
  local observable = RxR15Utils.observeRigMotorBrio(character, data.partName, data.motorName):Pipe({
281
281
  RxBrioUtils.switchMapBrio(function(motor)
282
- local ragdollMotorData = RagdollMotorData:CreateValue(motor)
282
+ local ragdollMotorData = RagdollMotorData:Create(motor)
283
283
 
284
284
  return Rx.combineLatest({
285
285
  motor = motor;
@@ -323,7 +323,7 @@ function RagdollMotorUtils.suppressMotors(character, rigType, velocityReadings)
323
323
  for _, data in pairs(RagdollMotorUtils.getMotorData(rigType)) do
324
324
  local observable = RxR15Utils.observeRigMotorBrio(character, data.partName, data.motorName):Pipe({
325
325
  RxBrioUtils.switchMapBrio(function(motor)
326
- local ragdollMotorData = RagdollMotorData:CreateValue(motor)
326
+ local ragdollMotorData = RagdollMotorData:Create(motor)
327
327
 
328
328
  return RxBrioUtils.flatCombineLatest({
329
329
  motor = motor;
@@ -71,9 +71,7 @@ function RxRagdollUtils.enforceHeadCollision(character)
71
71
  return
72
72
  end
73
73
 
74
- local head = brio:GetValue()
75
- local maid = brio:ToMaid()
76
-
74
+ local maid, head = brio:ToMaidAndValue()
77
75
  head.CanCollide = true
78
76
 
79
77
  maid:GiveTask(function()
@@ -84,6 +82,69 @@ function RxRagdollUtils.enforceHeadCollision(character)
84
82
  return topMaid
85
83
  end
86
84
 
85
+ function RxRagdollUtils.enforceHumanoidStateMachineOff(character, humanoid)
86
+ assert(typeof(character) == "Instance" and character:IsA("Model"), "Bad character")
87
+
88
+ local topMaid = Maid.new()
89
+
90
+ topMaid:GiveTask(RxInstanceUtils.observePropertyBrio(humanoid, "EvaluateStateMachine", function(evaluateStateMachine)
91
+ return not evaluateStateMachine
92
+ end):Subscribe(function(brio)
93
+ if brio:IsDead() then
94
+ return
95
+ end
96
+
97
+ local maid = brio:ToMaid()
98
+ maid:GiveTask(RxRagdollUtils.enforceLimbCollisions(character))
99
+ end))
100
+
101
+ return topMaid
102
+ end
103
+
104
+ function RxRagdollUtils.enforceLimbCollisions(character)
105
+ assert(typeof(character) == "Instance" and character:IsA("Model"), "Bad character")
106
+
107
+ local topMaid = Maid.new()
108
+
109
+ local LIMB_NAMES = {
110
+ -- R6
111
+ ["Left Arm"] = true;
112
+ ["Right Arm"] = true;
113
+ ["Left Leg"] = true;
114
+ ["Right Leg"] = true;
115
+
116
+ -- R15
117
+ ["LeftUpperArm"] = true;
118
+ ["LeftLowerArm"] = true;
119
+ ["LeftHand"] = true;
120
+ ["LeftUpperLeg"] = true;
121
+ ["LeftLowerLeg"] = true;
122
+ ["LeftFoot"] = true;
123
+ ["RightUpperArm"] = true;
124
+ ["RightLowerArm"] = true;
125
+ ["RightHand"] = true;
126
+ ["RightUpperLeg"] = true;
127
+ ["RightLowerLeg"] = true;
128
+ ["RightFoot"] = true;
129
+ }
130
+
131
+ topMaid:GiveTask(RxInstanceUtils.observeChildrenBrio(character, function(child)
132
+ return child:IsA("BasePart") and LIMB_NAMES[child.Name]
133
+ end):Subscribe(function(brio)
134
+ if brio:IsDead() then
135
+ return
136
+ end
137
+
138
+ local maid, part = brio:ToMaidAndValue()
139
+ part.CanCollide = true
140
+ maid:GiveTask(function()
141
+ part.CanCollide = false
142
+ end)
143
+ end))
144
+
145
+ return topMaid
146
+ end
147
+
87
148
 
88
149
  function RxRagdollUtils.runLocal(humanoid)
89
150
  local topMaid = Maid.new()
@@ -108,6 +169,7 @@ function RxRagdollUtils.runLocal(humanoid)
108
169
 
109
170
  maid:GiveTask(RxRagdollUtils.suppressRootPartCollision(character, rigType))
110
171
  maid:GiveTask(RxRagdollUtils.enforceHeadCollision(character))
172
+ maid:GiveTask(RxRagdollUtils.enforceHumanoidStateMachineOff(character, humanoid))
111
173
 
112
174
  -- Do motors
113
175
  maid:GiveTask(RagdollMotorUtils.suppressMotors(character, rigType, velocityReadings))