WIP: Spawn bullets on the server and sync them
This commit is contained in:
@ -16,10 +16,11 @@ func _process(delta: float) -> void:
|
||||
|
||||
func _on_head_collision_body_part_hit(dam: Variant) -> void:
|
||||
print("head is hit" + str(dam))
|
||||
#owner_placeholder.take_damage(dam)
|
||||
print(owner_placeholder)
|
||||
owner_placeholder.take_damage(dam)
|
||||
pass # Replace with function body.
|
||||
|
||||
func _get_owner() -> CharacterBody3D:
|
||||
var owner_placeholder := find_parent("CharacterPlaceholder")
|
||||
var owner_placeholder := find_parent("PlayerPlaceholder*")
|
||||
return owner_placeholder
|
||||
|
||||
|
@ -1344,7 +1344,7 @@ surface_material_override/0 = SubResource("StandardMaterial3D_j3emx")
|
||||
[node name="HitCollisions" type="Node3D" parent="Body/Armature/Skeleton3D"]
|
||||
|
||||
[node name="BoneAttachment3D" type="BoneAttachment3D" parent="Body/Armature/Skeleton3D"]
|
||||
transform = Transform3D(0.978017, -0.176546, -0.110973, 0.15839, 0.282801, 0.946011, -0.135631, -0.942791, 0.304547, -11.8203, 17.7472, -135.936)
|
||||
transform = Transform3D(0.978017, -0.176546, -0.110972, 0.15839, 0.282801, 0.94601, -0.135631, -0.942791, 0.304547, -11.8203, 17.7472, -135.936)
|
||||
bone_name = "mixamorig_Head"
|
||||
bone_idx = 5
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
extends Area3D
|
||||
|
||||
@export var damage: int = 100
|
||||
@export var damage: int = 20
|
||||
|
||||
signal body_part_hit(dam)
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
|
@ -14,6 +14,9 @@ properties/0/replication_mode = 1
|
||||
properties/1/path = NodePath(".:rotation")
|
||||
properties/1/spawn = true
|
||||
properties/1/replication_mode = 1
|
||||
properties/2/path = NodePath(".:health")
|
||||
properties/2/spawn = true
|
||||
properties/2/replication_mode = 1
|
||||
|
||||
[sub_resource type="Animation" id="Animation_falg4"]
|
||||
length = 0.001
|
||||
@ -149,7 +152,7 @@ grow_vertical = 0
|
||||
text = "100"
|
||||
label_settings = SubResource("LabelSettings_toaij")
|
||||
|
||||
[node name="FPS" type="Label" parent="FirstPersonCameraMount/HUD"]
|
||||
[node name="FPS" type="Label" parent="FirstPersonCameraMount/HUD" groups=["player_placeholder"]]
|
||||
layout_mode = 1
|
||||
offset_right = 40.0
|
||||
offset_bottom = 23.0
|
||||
|
Reference in New Issue
Block a user