Renamed a bunch of player stuff to pawn stuff and implemented extensive work on getting single-address 'netplay' code working. Not sure if I've created issues with single player but in theory it should all transfer across as if the player is simply always the host.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
class_name MultiplayerPC extends Player
|
||||
class_name MultiplayerPC extends PawnController
|
||||
|
||||
@export var player_id := 1 :
|
||||
set(id):
|
||||
@@ -12,7 +12,7 @@ func _enter_tree() -> void:
|
||||
func setup(id) -> void:
|
||||
name = "Player " + str(id)
|
||||
player_id = id
|
||||
if Multiplayer.is_server() == (id == 1):
|
||||
if Multiplayer.id == id:
|
||||
Game.player = self
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
|
||||
Reference in New Issue
Block a user