Multiplayer Visibility, Input Authority
This commit is contained in:
parent
83b109e4bc
commit
82295d8642
3 changed files with 8 additions and 1 deletions
|
|
@ -23,6 +23,10 @@ GameEvents="*uid://4xof67e363t4"
|
|||
ChatManager="*uid://c351ysuym2mdm"
|
||||
NetworkManager="*uid://tniwwfk5703p"
|
||||
|
||||
[global_group]
|
||||
|
||||
players="Verwaltung der Spieler Objekte"
|
||||
|
||||
[physics]
|
||||
|
||||
3d/physics_engine="Jolt Physics"
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_fqfg4"]
|
||||
|
||||
[node name="CharacterBody3D" type="CharacterBody3D" unique_id=682006733]
|
||||
[node name="CharacterBody3D" type="CharacterBody3D" unique_id=682006733 groups=["players"]]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.26067275)
|
||||
script = ExtResource("1_ktl23")
|
||||
interpolation_speed = 5.0
|
||||
|
|
|
|||
|
|
@ -84,6 +84,9 @@ func request_move(target: Vector3):
|
|||
target_position = target
|
||||
|
||||
func _input(event):
|
||||
# Ist dieser Avatar nicht der des lokalen Spielers? Wenn ja, sofort abbrechen.
|
||||
if name.to_int() != multiplayer.get_unique_id(): return
|
||||
|
||||
# NUR der Client, der diesen Spieler kontrolliert, darf klicken
|
||||
#if not is_multiplayer_authority(): return
|
||||
if DisplayServer.get_name() == "headless": return # Server ignoriert Klicks
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue