Started on spawning a player actor

This commit is contained in:
AeonLucid
2022-01-13 02:00:36 +01:00
parent a7399a1960
commit 6cd03d9ff7
9 changed files with 173 additions and 20 deletions
+31 -2
View File
@@ -1,6 +1,35 @@
namespace Prospect.Unreal.Net.Actors;
using Prospect.Unreal.Core;
namespace Prospect.Unreal.Net.Actors;
public class AActor
{
/// <summary>
/// Sets the value of Role without causing other side effects to this instance.
/// </summary>
public void SetRole(ENetRole inRole)
{
// TODO: Implement
throw new NotImplementedException();
}
/// <summary>
/// Set whether this actor replicates to network clients. When this actor is spawned on the server it will be sent to clients as well.
/// Properties flagged for replication will update on clients if they change on the server.
/// Internally changes the RemoteRole property and handles the cases where the actor needs to be added to the network actor list.
/// </summary>
public void SetReplicates(bool bInReplicates)
{
// TODO: Implement
throw new NotImplementedException();
}
/// <summary>
/// Sets whether or not this Actor is an autonomous proxy, which is an actor on a network client that is controlled by a user on that client.
/// </summary>
public void SetAutonomousProxy(bool bInAutonomousProxy, bool bAllowForcePropertyCompare = true)
{
// TODO: Implement
throw new NotImplementedException();
}
}
@@ -0,0 +1,6 @@
namespace Prospect.Unreal.Net.Actors;
public class AController : AActor
{
}
@@ -1,4 +1,7 @@
namespace Prospect.Unreal.Net.Actors;
using Prospect.Unreal.Core;
using Prospect.Unreal.Runtime;
namespace Prospect.Unreal.Net.Actors;
public class AGameModeBase : AInfo
{
@@ -7,4 +10,16 @@ public class AGameModeBase : AInfo
// Login unique id must match server expected unique id type OR No unique id could mean game doesn't use them
errorMessage = null;
}
public APlayerController? Login(UPlayer newPlayer, ENetRole inRemoteRole, string portal, string options, FUniqueNetIdRepl uniqueId, out string errorMessage)
{
errorMessage = string.Empty;
throw new NotImplementedException();
return null;
}
public void PostLogin(APlayerController newPlayer)
{
throw new NotImplementedException();
}
}
@@ -1,6 +1,18 @@
namespace Prospect.Unreal.Net.Player;
using Prospect.Unreal.Runtime;
public class APlayerController
namespace Prospect.Unreal.Net.Actors;
public class APlayerController : AController
{
/// <summary>
/// Index identifying players using the same base connection (splitscreen clients)
/// Used by netcode to match replicated PlayerControllers to the correct splitscreen viewport and child connection
/// replicated via special internal code, not through normal variable replication
/// </summary>
public byte NetPlayerIndex { get; set; }
public void SetPlayer(UPlayer inPlayer)
{
throw new NotImplementedException();
}
}