WIP: Damage/frag system is implemented without ragdolls

This commit is contained in:
2025-02-03 23:03:36 +01:00
parent 7012846b00
commit b63b7a7d09
31 changed files with 5748 additions and 4972 deletions

View File

@ -261,8 +261,6 @@ func _shoot():
var collider := aim_ray.get_collider()
if collider != null and collider.is_in_group("target"):
aim_ray.get_collider().take_damage()
if collider != null and collider.is_in_group("body"):
collider.hit(50)
var root := get_tree().get_root()
gun_with_hands.shoot()
cant_shoot = true
@ -288,6 +286,7 @@ func _get_camera_collision():
return ray_end
func take_damage(dam: int):
print("takin damage")
var new_health = health - dam
set_health(new_health)
if multiplayer.is_server():