mirror of
https://gitlab.com/open-fpsz/open-fpsz.git
synced 2026-07-16 00:44:50 +00:00
Merge branch 'fix/player-nicknames-and-iffs' into 'develop'
🐛 Fix player nicknames and IFFs See merge request open-fpsz/open-fpsz!63
This commit is contained in:
commit
0cbcb9a6a7
3 changed files with 3 additions and 3 deletions
|
|
@ -62,7 +62,7 @@ var g : float = ProjectSettings.get_setting("physics/3d/default_gravity") # in m
|
||||||
var gravity : Vector3 = g * ProjectSettings.get_setting("physics/3d/default_gravity_vector")
|
var gravity : Vector3 = g * ProjectSettings.get_setting("physics/3d/default_gravity_vector")
|
||||||
var _jumping : bool = false
|
var _jumping : bool = false
|
||||||
|
|
||||||
@rpc("call_local")
|
@rpc("call_local", "reliable")
|
||||||
func set_nickname(value : String) -> void:
|
func set_nickname(value : String) -> void:
|
||||||
nickname = value
|
nickname = value
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ extends Control
|
||||||
@onready var healthbar_fill_stylebox : StyleBoxFlat = _health_bar.get_theme_stylebox("fill")
|
@onready var healthbar_fill_stylebox : StyleBoxFlat = _health_bar.get_theme_stylebox("fill")
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
_player_name_label.text = player.name
|
_player_name_label.text = player.nickname
|
||||||
|
|
||||||
func _process(_delta : float) -> void:
|
func _process(_delta : float) -> void:
|
||||||
# retrieve camera for current viewport
|
# retrieve camera for current viewport
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,7 @@ func _unhandled_input(event : InputEvent) -> void:
|
||||||
for score_label in %Scores.get_children():
|
for score_label in %Scores.get_children():
|
||||||
score_label.queue_free()
|
score_label.queue_free()
|
||||||
|
|
||||||
@rpc("any_peer")
|
@rpc("any_peer", "reliable")
|
||||||
func _join_match(nickname : String) -> void:
|
func _join_match(nickname : String) -> void:
|
||||||
if is_multiplayer_authority():
|
if is_multiplayer_authority():
|
||||||
add_player(multiplayer.get_remote_sender_id(), nickname)
|
add_player(multiplayer.get_remote_sender_id(), nickname)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue