feat: added ragdoll, health, death, and adjusted mortar

This commit is contained in:
DottsGit
2026-06-06 00:01:27 -04:00
parent 8984739334
commit acd495893d
7 changed files with 368 additions and 43 deletions
+2 -1
View File
@@ -194,7 +194,8 @@ func _shoot_hitscan() -> void:
damage = lerpf(base_dmg, min_dmg, falloff_factor)
if result.collider.has_method("take_damage"):
result.collider.take_damage(damage, result.position, player)
var hit_impulse = pellet_dir * 8.0 # Apply strong physical force for ragdoll
result.collider.take_damage(damage, result.position, player, hit_impulse)
else:
ImpactSpawner.spawn(get_tree(), "bullet", result.position, result.normal, 0.08)
+3 -3
View File
@@ -6,8 +6,8 @@ func _init() -> void:
fire_rate = 1.5 # Slow
max_ammo = 1
reload_time = 3.0 # Extremely long
base_damage = 200.0 # Huge damage
min_damage = 20.0
base_damage = 230.0 # Huge damage
min_damage = 50.0
falloff_start = 0.0
max_range = 500.0
automatic = false
@@ -72,7 +72,7 @@ func _spawn_custom_projectile(origin: Vector3, fire_dir: Vector3) -> void:
# Mortar Bouncing logic
proj.fuse_time = -1.0 # Don't start ticking until it bounces
proj.bounce_fuse_delay = 3.0 # Explodes 3 seconds after first bounce
proj.impact_detonate_time = 2.0 # If flying > 2s, explode on impact instead
proj.impact_detonate_time = 1.0 # If flying > 1s, explode on impact instead
proj.bounciness = 0.4 # Heavy, loses momentum on bounce
# Explosive stats