movement sync
This commit is contained in:
parent
daa83ce96d
commit
bb3a14ece7
13 changed files with 46 additions and 35 deletions
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=80 format=4 uid="uid://dpsr6ug3pkb40"]
|
||||
[gd_scene load_steps=82 format=4 uid="uid://dpsr6ug3pkb40"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://3dphlay25fih" path="res://scripts/player/player.gd" id="1_g2els"]
|
||||
[ext_resource type="Script" uid="uid://dalwlndejfdhm" path="res://scripts/player/crosshair.gd" id="3_dqkch"]
|
||||
|
|
@ -36,6 +36,7 @@
|
|||
[ext_resource type="Script" uid="uid://b2djbdh05pbcn" path="res://scripts/player/team_color_switcher.gd" id="25_1mtds"]
|
||||
[ext_resource type="Material" uid="uid://cjb0h3of85nc2" path="res://materials/players/molikman/mat_Molikman.tres" id="26_r2jxp"]
|
||||
[ext_resource type="Texture2D" uid="uid://15mf4452fse0" path="res://textures/players/molikman/molikman_ingame_Molikman_blue.png" id="27_j3w78"]
|
||||
[ext_resource type="Script" uid="uid://dfvnx8f1v6m5g" path="res://scripts/multiplayer/player_input.gd" id="37_b2eak"]
|
||||
|
||||
[sub_resource type="ArrayMesh" id="ArrayMesh_lot4n"]
|
||||
_surfaces = [{
|
||||
|
|
@ -7413,15 +7414,21 @@ properties/0/replication_mode = 1
|
|||
properties/1/path = NodePath(".:rotation")
|
||||
properties/1/spawn = true
|
||||
properties/1/replication_mode = 1
|
||||
properties/2/path = NodePath("Camera3D:rotation")
|
||||
properties/2/path = NodePath(".:hp")
|
||||
properties/2/spawn = true
|
||||
properties/2/replication_mode = 1
|
||||
properties/3/path = NodePath(".:hp")
|
||||
properties/3/path = NodePath(".:team")
|
||||
properties/3/spawn = true
|
||||
properties/3/replication_mode = 1
|
||||
properties/4/path = NodePath(".:team")
|
||||
properties/3/replication_mode = 2
|
||||
properties/4/path = NodePath(".:player_id")
|
||||
properties/4/spawn = true
|
||||
properties/4/replication_mode = 2
|
||||
properties/4/replication_mode = 0
|
||||
properties/5/path = NodePath(".:collision_layer")
|
||||
properties/5/spawn = true
|
||||
properties/5/replication_mode = 0
|
||||
properties/6/path = NodePath(".:collision_mask")
|
||||
properties/6/spawn = true
|
||||
properties/6/replication_mode = 0
|
||||
|
||||
[sub_resource type="Curve" id="Curve_fbysy"]
|
||||
_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(1, 1), 2.5229826, 0.0, 0, 0]
|
||||
|
|
@ -7604,6 +7611,11 @@ _data = {
|
|||
radius = 0.82177734
|
||||
height = 3.7087402
|
||||
|
||||
[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_5amik"]
|
||||
properties/0/path = NodePath("PlayerInput:direction")
|
||||
properties/0/spawn = true
|
||||
properties/0/replication_mode = 1
|
||||
|
||||
[node name="Player" type="CharacterBody3D" node_paths=PackedStringArray("weapon_models")]
|
||||
collision_layer = 2
|
||||
collision_mask = 3
|
||||
|
|
@ -8701,7 +8713,7 @@ grow_vertical = 2
|
|||
visible = false
|
||||
layout_mode = 2
|
||||
|
||||
[node name="MultiplayerSynchronizer" type="MultiplayerSynchronizer" parent="."]
|
||||
[node name="PlayerPropertiesSync" type="MultiplayerSynchronizer" parent="."]
|
||||
replication_config = SubResource("SceneReplicationConfig_qhqgy")
|
||||
|
||||
[node name="StepAudio" type="AudioStreamPlayer3D" parent="."]
|
||||
|
|
@ -8794,9 +8806,10 @@ land_sound = NodePath("../../LandAudio")
|
|||
script = ExtResource("19_rwwcc")
|
||||
animation_player = NodePath("../../AnimationPlayer")
|
||||
|
||||
[node name="PlayerMovement" type="Node" parent="." node_paths=PackedStringArray("player")]
|
||||
[node name="PlayerMovement" type="Node" parent="." node_paths=PackedStringArray("player", "player_input")]
|
||||
script = ExtResource("19_70eug")
|
||||
player = NodePath("..")
|
||||
player_input = NodePath("../PlayerInput")
|
||||
|
||||
[node name="WeaponSystem" type="Node" parent="." node_paths=PackedStringArray("animation_player", "camera", "player")]
|
||||
script = ExtResource("4_qlg0r")
|
||||
|
|
@ -8841,6 +8854,10 @@ material = ExtResource("26_r2jxp")
|
|||
player = NodePath("..")
|
||||
blue_team_texture = ExtResource("27_j3w78")
|
||||
|
||||
[node name="PlayerInput" type="MultiplayerSynchronizer" parent="."]
|
||||
replication_config = SubResource("SceneReplicationConfig_5amik")
|
||||
script = ExtResource("37_b2eak")
|
||||
|
||||
[connection signal="died" from="." to="molikman_ingame/VisibleEnabler" method="reverse"]
|
||||
[connection signal="died" from="." to="Camera3D" method="disable"]
|
||||
[connection signal="died" from="." to="Camera3D/DeadSpectator" method="set_active"]
|
||||
|
|
@ -8848,5 +8865,4 @@ blue_team_texture = ExtResource("27_j3w78")
|
|||
[connection signal="died" from="." to="PlayerMovement" method="disable"]
|
||||
[connection signal="died" from="." to="WeaponSystem" method="disable"]
|
||||
[connection signal="health_changed" from="." to="HUD/Healthbar" method="on_hp_changed"]
|
||||
[connection signal="spawned" from="." to="TeamUpdater" method="on_spawned"]
|
||||
[connection signal="ammo_updated" from="WeaponSystem" to="HUD/AmmoDisplay" method="on_ammo_updated"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue