fix: ragdoll knockback is lowered across the board

This commit is contained in:
DottsGit
2026-06-06 00:19:02 -04:00
parent cb5708e19e
commit 0b8dcaf3ce
2 changed files with 6 additions and 7 deletions
+5 -6
View File
@@ -89,10 +89,9 @@ func _die(_hit_position: Vector3, source: Node, damage_amount: float) -> void:
var impulse = Vector3.ZERO
if pending_impulse.length_squared() > 0.01:
# The player treats incoming impulses as direct velocity additions (v += impulse)
# To make the dummy fly exactly like the player, we must use it as base linear velocity!
linear_vel = pending_impulse
impulse = pending_impulse * 0.5
# Scale down the massive direct impulse values to reasonable ragdoll velocities
linear_vel = pending_impulse * 0.25
impulse = pending_impulse * 0.2
pending_impulse = Vector3.ZERO
else:
var hit_dir = Vector3.BACK
@@ -103,8 +102,8 @@ func _die(_hit_position: Vector3, source: Node, damage_amount: float) -> void:
if cam:
hit_dir = (_hit_position - cam.global_position).normalized()
linear_vel = hit_dir * (damage_amount * 0.05)
impulse = hit_dir * (damage_amount * 1.5)
linear_vel = hit_dir * (damage_amount * 0.02)
impulse = hit_dir * (damage_amount * 0.5)
get_tree().create_timer(0.01).timeout.connect(func():
if is_instance_valid(ragdoll_instance):
+1 -1
View File
@@ -194,7 +194,7 @@ func _shoot_hitscan() -> void:
damage = lerpf(base_dmg, min_dmg, falloff_factor)
if result.collider.has_method("apply_impulse"):
result.collider.apply_impulse(pellet_dir * 8.0) # Apply strong physical force for ragdoll
result.collider.apply_impulse(pellet_dir * 2.5) # Apply strong physical force for ragdoll
if result.collider.has_method("take_damage"):
result.collider.take_damage(damage, result.position, player)