@rbxts/falldown 1.2.0 → 1.3.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/out/init.luau +26 -7
- package/package.json +1 -1
package/out/init.luau
CHANGED
|
@@ -377,6 +377,7 @@ do
|
|
|
377
377
|
function ActiveRagdoll:constructor(character, objectiveHeight, standFadeTime, humanoid, humanoidRootPart, leftTouchObj, rightTouchObj, jointDestructionInfo, bodypartGroupId, automaticDuration, exitMode, getupFront, getupBack)
|
|
378
378
|
self.Destroyed = Signal.new()
|
|
379
379
|
self.Ended = Signal.new()
|
|
380
|
+
self.EndTime = nil
|
|
380
381
|
if Falldown.DisableShiftLockOnRagdoll then
|
|
381
382
|
local player = Players:GetPlayerFromCharacter(character)
|
|
382
383
|
if player then
|
|
@@ -421,13 +422,22 @@ do
|
|
|
421
422
|
_condition = not self.CharacterDead
|
|
422
423
|
end
|
|
423
424
|
if _condition ~= 0 and _condition == _condition and _condition then
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
425
|
+
self.EndTime = DateTime.now().UnixTimestampMillis + (self._automaticDuration * 1000)
|
|
426
|
+
self._durationListener = RunService.Heartbeat:Connect(function()
|
|
427
|
+
if self.EndTime == nil then
|
|
428
|
+
self._durationListener:Disconnect()
|
|
429
|
+
return nil
|
|
430
|
+
end
|
|
431
|
+
if DateTime.now().UnixTimestampMillis >= self.EndTime then
|
|
432
|
+
self.EndTime = nil
|
|
433
|
+
local _self = self
|
|
434
|
+
local _condition_1 = exitMode
|
|
435
|
+
if not (_condition_1 ~= 0 and _condition_1 == _condition_1 and _condition_1) then
|
|
436
|
+
_condition_1 = Falldown.ExitMode.Smooth
|
|
437
|
+
end
|
|
438
|
+
_self:Destroy(_condition_1)
|
|
439
|
+
self._durationListener:Disconnect()
|
|
429
440
|
end
|
|
430
|
-
_self:Destroy(_condition_1)
|
|
431
441
|
end)
|
|
432
442
|
end
|
|
433
443
|
end
|
|
@@ -503,6 +513,7 @@ do
|
|
|
503
513
|
end
|
|
504
514
|
end
|
|
505
515
|
function ActiveRagdoll:Destroy(exitMode, overrideDeathLock)
|
|
516
|
+
self.EndTime = nil
|
|
506
517
|
if self.Character.Parent == nil then
|
|
507
518
|
return nil
|
|
508
519
|
end
|
|
@@ -1539,7 +1550,15 @@ do
|
|
|
1539
1550
|
function Falldown:RagdollCharacter(character, standupFadeTime, automaticDuration, exitMode, getupFront, getupBack)
|
|
1540
1551
|
local __activeRagdolls = self._activeRagdolls
|
|
1541
1552
|
local _character = character
|
|
1542
|
-
|
|
1553
|
+
local existing = __activeRagdolls[_character]
|
|
1554
|
+
if existing then
|
|
1555
|
+
if existing.EndTime ~= nil then
|
|
1556
|
+
if automaticDuration ~= nil then
|
|
1557
|
+
existing.EndTime = DateTime.now().UnixTimestampMillis + (automaticDuration * 1000)
|
|
1558
|
+
else
|
|
1559
|
+
existing.EndTime = nil
|
|
1560
|
+
end
|
|
1561
|
+
end
|
|
1543
1562
|
return nil
|
|
1544
1563
|
end
|
|
1545
1564
|
local humanoid = character:FindFirstChildOfClass("Humanoid")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rbxts/falldown",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "A realistic ragdoll physics system for Roblox with smooth getup animations, collision management, and customizable velocity modes. Supports both R6 and R15 rigs with surface-aware positioning.",
|
|
5
5
|
"main": "out/init.luau",
|
|
6
6
|
"scripts": {
|