WIP: Spawn bullets on the server and sync them

This commit is contained in:
Nikolai Rodionov 2025-01-26 20:27:25 +01:00
parent 24914cb6fa
commit 5678ddb4c1
Signed by: allanger
GPG Key ID: 09F8B434D0FDD99B
2 changed files with 3 additions and 1 deletions

View File

@ -17,7 +17,8 @@ func _process(delta: float) -> void:
func _on_head_collision_body_part_hit(dam: Variant) -> void:
print("head is hit" + str(dam))
print(owner_placeholder)
owner_placeholder.take_damage(dam)
if owner_placeholder.has_method("take_damage"):
owner_placeholder.take_damage(dam)
pass # Replace with function body.
func _get_owner() -> CharacterBody3D:

View File

@ -255,4 +255,5 @@ func _hit_scan_damage(Collider):
print("damaged")
func take_damage(dam: int):
print("damage")
health =- dam