@quenty/ragdoll 15.7.0 → 15.7.1-canary.491.adb5527.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,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.7.1-canary.491.adb5527.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/ragdoll@15.7.0...@quenty/ragdoll@15.7.1-canary.491.adb5527.0) (2024-08-27)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Upgrade ragdoll to support humanoid state machine off ([adb5527](https://github.com/Quenty/NevermoreEngine/commit/adb55278c70c19c3ef22a9ee6c00e8b82337aaaf))
12
+
13
+
14
+
15
+
16
+
6
17
  # [15.7.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/ragdoll@15.6.1...@quenty/ragdoll@15.7.0) (2024-08-09)
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.7.0",
3
+ "version": "15.7.1-canary.491.adb5527.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.5.0",
29
- "@quenty/attributeutils": "^14.4.0",
30
- "@quenty/baseobject": "^10.3.0",
31
- "@quenty/binder": "^14.5.0",
32
- "@quenty/brio": "^14.4.0",
33
- "@quenty/camera": "^14.6.0",
34
- "@quenty/cancellabledelay": "^3.5.0",
35
- "@quenty/characterutils": "^12.4.0",
36
- "@quenty/draw": "^7.3.0",
37
- "@quenty/enumutils": "^3.2.0",
38
- "@quenty/hapticfeedbackutils": "^3.2.0",
39
- "@quenty/instanceutils": "^13.4.0",
40
- "@quenty/loader": "^10.3.0",
41
- "@quenty/maid": "^3.2.0",
42
- "@quenty/motor6d": "^7.6.0",
43
- "@quenty/physicsutils": "^8.4.0",
44
- "@quenty/playerhumanoidbinder": "^14.5.0",
45
- "@quenty/promise": "^10.3.0",
46
- "@quenty/qframe": "^10.3.0",
47
- "@quenty/r15utils": "^13.4.0",
48
- "@quenty/remoting": "^12.5.0",
49
- "@quenty/rx": "^13.4.0",
50
- "@quenty/rxbinderutils": "^14.5.0",
51
- "@quenty/rxsignal": "^7.4.0",
52
- "@quenty/spring": "^10.3.0",
53
- "@quenty/steputils": "^3.4.0",
54
- "@quenty/table": "^3.5.0",
55
- "@quenty/tie": "^10.6.0",
56
- "@quenty/valuebaseutils": "^13.4.0",
57
- "@quenty/valueobject": "^13.4.0"
28
+ "@quenty/adorneedata": "7.5.0",
29
+ "@quenty/attributeutils": "14.4.0",
30
+ "@quenty/baseobject": "10.3.0",
31
+ "@quenty/binder": "14.5.0",
32
+ "@quenty/brio": "14.4.0",
33
+ "@quenty/camera": "14.6.0",
34
+ "@quenty/cancellabledelay": "3.5.0",
35
+ "@quenty/characterutils": "12.4.0",
36
+ "@quenty/draw": "7.3.0",
37
+ "@quenty/enumutils": "3.2.0",
38
+ "@quenty/hapticfeedbackutils": "3.2.0",
39
+ "@quenty/instanceutils": "13.4.0",
40
+ "@quenty/loader": "10.3.0",
41
+ "@quenty/maid": "3.2.0",
42
+ "@quenty/motor6d": "7.6.0",
43
+ "@quenty/physicsutils": "8.4.0",
44
+ "@quenty/playerhumanoidbinder": "14.5.0",
45
+ "@quenty/promise": "10.3.0",
46
+ "@quenty/qframe": "10.3.0",
47
+ "@quenty/r15utils": "13.4.0",
48
+ "@quenty/remoting": "12.5.0",
49
+ "@quenty/rx": "13.4.0",
50
+ "@quenty/rxbinderutils": "14.5.0",
51
+ "@quenty/rxsignal": "7.4.0",
52
+ "@quenty/spring": "10.3.0",
53
+ "@quenty/steputils": "3.4.0",
54
+ "@quenty/table": "3.5.0",
55
+ "@quenty/tie": "10.6.0",
56
+ "@quenty/valuebaseutils": "13.4.0",
57
+ "@quenty/valueobject": "13.4.0"
58
58
  },
59
59
  "publishConfig": {
60
60
  "access": "public"
61
61
  },
62
- "gitHead": "ba466bdbc05c42fb607cf5e228c16339201d21d7"
62
+ "gitHead": "adb55278c70c19c3ef22a9ee6c00e8b82337aaaf"
63
63
  }
@@ -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))