Same as prev, but better

This commit is contained in:
Spencer Killen 2024-05-25 18:47:51 -06:00
parent ba14ca7ea0
commit ef5ceb0b95
Signed by: sjkillen
GPG Key ID: 3AF3117BA6FBB75B
2 changed files with 1 additions and 4 deletions

View File

@ -10,6 +10,5 @@ func spawn_player(owner_id: int):
if multiplayer.get_unique_id() == owner_id: if multiplayer.get_unique_id() == owner_id:
var camera := preload("res://camera/camera.tscn").instantiate() var camera := preload("res://camera/camera.tscn").instantiate()
player.add_child(camera) player.add_child(camera)
player.position.y = 5.0
return player return player

View File

@ -3,9 +3,7 @@ extends Node3D
func _ready(): func _ready():
# Hacky way to start level without going though multiplayer screens # Hacky way to start level without going though multiplayer screens
if get_parent() == get_tree().root: if get_parent() == get_tree().root:
var player := preload("res://player/player.tscn").instantiate() %PlayerSpawner.spawn(multiplayer.get_unique_id())
player.add_child(preload("res://camera/camera.tscn").instantiate())
%Players.add_child(player)
# Called from the server # Called from the server
func server_add_player(id: int): func server_add_player(id: int):