WIP: Damage/frag system is implemented without ragdolls
This commit is contained in:
@ -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():
|
||||
|
Reference in New Issue
Block a user