staf
This commit is contained in:
@@ -27,6 +27,7 @@ namespace Game
|
||||
|
||||
public static bool Connect(string ip = null, ushort port = 0)
|
||||
{
|
||||
Console.Clear();
|
||||
if (ServerRunning)
|
||||
NetworkManager_Cleanup();
|
||||
|
||||
@@ -48,6 +49,7 @@ namespace Game
|
||||
|
||||
public static bool StartServer(bool listenServer)
|
||||
{
|
||||
Console.Clear();
|
||||
if (ServerRunning)
|
||||
NetworkManager_Cleanup();
|
||||
|
||||
@@ -198,8 +200,15 @@ namespace Game
|
||||
Console.PrintError("GameModeManager: Failed to find PlayerPrefab");
|
||||
|
||||
PlayerActor playerActor = PrefabManager.SpawnPrefab(playerPrefab).As<PlayerActor>();
|
||||
NetworkReplicator.AddObject(playerActor);
|
||||
playerActor.hai = 123;
|
||||
playerActor.Initialize(clientId);
|
||||
playerActor.IsActive = true;
|
||||
|
||||
playerActor.Teleport(spawnPosition, spawnAngles);
|
||||
//NetworkReplicator.SetObjectOwnership(playerActor, clientId);
|
||||
|
||||
NetworkReplicator.SpawnObject(playerActor);
|
||||
}
|
||||
|
||||
public void OnPlayerInit()
|
||||
|
||||
Reference in New Issue
Block a user