WIP: Some updates
This commit is contained in:
parent
b3d2461961
commit
e922911f92
1
Makefile
1
Makefile
@ -1,6 +1,7 @@
|
|||||||
JOLT_VERSION = v0.14.0-stable
|
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_URL = https://github.com/godot-jolt/godot-jolt/releases/download/${JOLT_VERSION}/godot-jolt_${JOLT_VERSION}.zip
|
||||||
JOLT_DIR = ./godot/jolt
|
JOLT_DIR = ./godot/jolt
|
||||||
|
|
||||||
install_jolt:
|
install_jolt:
|
||||||
rm -rf ${JOLT_DIR}
|
rm -rf ${JOLT_DIR}
|
||||||
$(eval DOWNLOAD := $(shell mktemp -d))
|
$(eval DOWNLOAD := $(shell mktemp -d))
|
||||||
|
@ -16,8 +16,8 @@ func _ready() -> void:
|
|||||||
func _process(delta: float) -> void:
|
func _process(delta: float) -> void:
|
||||||
set_multiplayer_authority(multiplayer.get_unique_id())
|
set_multiplayer_authority(multiplayer.get_unique_id())
|
||||||
if owner_placeholder:
|
if owner_placeholder:
|
||||||
global_transform = owner_placeholder.shared_node.global_transform
|
global_transform = owner_placeholder.global_transform
|
||||||
global_rotation = owner_placeholder.shared_node.global_rotation
|
global_rotation = owner_placeholder.global_rotation
|
||||||
# Set the owner placeholder, so the characters can send the requests to a node
|
# Set the owner placeholder, so the characters can send the requests to a node
|
||||||
# it depends on
|
# it depends on
|
||||||
func set_owner_placeholder(owner: Node3D):
|
func set_owner_placeholder(owner: Node3D):
|
||||||
|
@ -23,6 +23,12 @@ func _ready() -> void:
|
|||||||
shared_node.set_collision_mask_value(3, true)
|
shared_node.set_collision_mask_value(3, true)
|
||||||
map_controller = find_parent("Map")
|
map_controller = find_parent("Map")
|
||||||
_load_weapon()
|
_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
|
# Load the default weapon and set the current attack properties
|
||||||
|
|
||||||
func _load_weapon() -> void:
|
func _load_weapon() -> void:
|
||||||
|
@ -24,7 +24,7 @@ properties/4/replication_mode = 2
|
|||||||
[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_8la7e"]
|
[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_8la7e"]
|
||||||
properties/0/path = NodePath("SharedNode:position")
|
properties/0/path = NodePath("SharedNode:position")
|
||||||
properties/0/spawn = true
|
properties/0/spawn = true
|
||||||
properties/0/replication_mode = 2
|
properties/0/replication_mode = 0
|
||||||
|
|
||||||
[node name="ServerNode" type="Node3D"]
|
[node name="ServerNode" type="Node3D"]
|
||||||
script = ExtResource("1_bau14")
|
script = ExtResource("1_bau14")
|
||||||
@ -33,6 +33,7 @@ script = ExtResource("1_bau14")
|
|||||||
|
|
||||||
[node name="Character" parent="SharedNode" instance=ExtResource("3_eykxo")]
|
[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)
|
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="."]
|
[node name="MainSynchronizer" type="MultiplayerSynchronizer" parent="."]
|
||||||
replication_config = SubResource("SceneReplicationConfig_2dhi2")
|
replication_config = SubResource("SceneReplicationConfig_2dhi2")
|
||||||
|
@ -639,6 +639,7 @@ _data = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[node name="WithHands" type="Node3D"]
|
[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")
|
script = ExtResource("1_h1xyo")
|
||||||
damage = 50
|
damage = 50
|
||||||
cooldown = 0.15
|
cooldown = 0.15
|
||||||
|
Loading…
Reference in New Issue
Block a user