mirror of
https://gitlab.com/open-fpsz/open-fpsz.git
synced 2026-01-19 19:44:46 +00:00
Hotfix: respawn uses map defined spawn points
This commit is contained in:
parent
d9cff62ec0
commit
67eacd9e04
|
|
@ -47,7 +47,8 @@ func _on_connection_failed() -> void:
|
|||
connection_failed.emit()
|
||||
|
||||
func respawn_player(player : Player) -> void:
|
||||
player.respawn(Vector3(0.0, 150.0, 0.0))
|
||||
var spawn_location : Vector3 = _map_manager.get_player_spawn().position
|
||||
player.respawn(spawn_location)
|
||||
|
||||
func add_player(peer_id : int, nickname : String) -> void:
|
||||
var player : Player = PLAYER.instantiate()
|
||||
|
|
@ -82,12 +83,11 @@ func _add_flag() -> void:
|
|||
|
||||
@rpc(\"any_peer\")
|
||||
func _join_match(nickname : String) -> void:
|
||||
if multiplayer.is_server():
|
||||
if is_multiplayer_authority():
|
||||
add_player(multiplayer.get_remote_sender_id(), nickname)
|
||||
|
||||
func _exit_tree() -> void:
|
||||
if multiplayer.is_server():
|
||||
#multiplayer.peer_connected.disconnect(add_player)
|
||||
if is_multiplayer_authority():
|
||||
multiplayer.peer_disconnected.disconnect(remove_player)
|
||||
"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue