WIP: Some updates

This commit is contained in:
Nikolai Rodionov 2025-02-09 17:53:52 +01:00
parent b3d2461961
commit e922911f92
Signed by: allanger
GPG Key ID: 09F8B434D0FDD99B
5 changed files with 12 additions and 3 deletions

View File

@ -1,6 +1,7 @@
JOLT_VERSION = v0.14.0-stable
JOLT_URL = https://github.com/godot-jolt/godot-jolt/releases/download/${JOLT_VERSION}/godot-jolt_${JOLT_VERSION}.zip
JOLT_DIR = ./godot/jolt
install_jolt:
rm -rf ${JOLT_DIR}
$(eval DOWNLOAD := $(shell mktemp -d))

View File

@ -16,8 +16,8 @@ func _ready() -> void:
func _process(delta: float) -> void:
set_multiplayer_authority(multiplayer.get_unique_id())
if owner_placeholder:
global_transform = owner_placeholder.shared_node.global_transform
global_rotation = owner_placeholder.shared_node.global_rotation
global_transform = owner_placeholder.global_transform
global_rotation = owner_placeholder.global_rotation
# Set the owner placeholder, so the characters can send the requests to a node
# it depends on
func set_owner_placeholder(owner: Node3D):

View File

@ -23,6 +23,12 @@ func _ready() -> void:
shared_node.set_collision_mask_value(3, true)
map_controller = find_parent("Map")
_load_weapon()
var model_scene: PackedScene = ResourceLoader.load("res://scenes/characters/y-bot/character.tscn")
var model: CharacterWrapper = model_scene.instantiate()
model.global_position = shared_node.global_position
model.set_owner_placeholder(shared_node)
shared_node.add_child(model)
# Load the default weapon and set the current attack properties
func _load_weapon() -> void:

View File

@ -24,7 +24,7 @@ properties/4/replication_mode = 2
[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_8la7e"]
properties/0/path = NodePath("SharedNode:position")
properties/0/spawn = true
properties/0/replication_mode = 2
properties/0/replication_mode = 0
[node name="ServerNode" type="Node3D"]
script = ExtResource("1_bau14")
@ -33,6 +33,7 @@ script = ExtResource("1_bau14")
[node name="Character" parent="SharedNode" instance=ExtResource("3_eykxo")]
transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 0, 0, 0)
visible = false
[node name="MainSynchronizer" type="MultiplayerSynchronizer" parent="."]
replication_config = SubResource("SceneReplicationConfig_2dhi2")

View File

@ -639,6 +639,7 @@ _data = {
}
[node name="WithHands" type="Node3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.528017, -0.924033, 0)
script = ExtResource("1_h1xyo")
damage = 50
cooldown = 0.15