WIP: Boostrapping NetSlime

- Just a old name for a set of changes to make the game framework hardened for multiplayer as well as some ease of use functionality.
This commit is contained in:
2024-04-23 01:10:02 -04:00
parent 28b1ad19dc
commit 2574960fff
50 changed files with 2109 additions and 119 deletions

View File

@ -1,10 +1,12 @@
#pragma once
#include "GasaActor.h"
#include "GasaCommon.h"
#include "GameFramework/Actor.h"
#include "CameraMount.generated.h"
UCLASS(Blueprintable)
class GASA_API ACameraMount : public AActor
class GASA_API ACameraMount : public AGasaActor
{
GENERATED_BODY()
public:

View File

View File

@ -0,0 +1,33 @@
#pragma once
#include "Networking/GasaNetLibrary.h"
#include "GameFramework/Actor.h"
#include "GasaActor.generated.h"
UCLASS()
class GASA_API AGasaActor : public AActor
{
GENERATED_BODY()
public:
#pragma region NetSlime
// NetSlime interface is generated by GasaGen/GasaGen_NetSlime.cpp
FORCEINLINE ENetworkMode GetNetworkMode() const { return Gasa::GetNetworkMode( this ); }
FORCEINLINE bool IsClient() const { return Gasa::IsClient( this ); }
FORCEINLINE bool IsListenServer() const { return Gasa::IsListenServer( this ); }
FORCEINLINE bool IsNetOwner() const { return Gasa::IsNetOwner( this ); }
FORCEINLINE bool IsServer() const { return Gasa::IsServer( this ); }
FORCEINLINE bool IsSimulatedProxy() const { return Gasa::IsSimulatedProxy( this ); }
FORCEINLINE void NetLog(
FString Message,
EGasaVerbosity Verbosity = EGasaVerbosity::Log,
FLogCategoryBase& Category = LogGasaNet,
bool DumpStack = false,
int32 Line = __builtin_LINE(),
ANSICHAR const* File = __builtin_FILE(),
ANSICHAR const* Func = __builtin_FUNCTION()
)
{
Gasa::NetLog( this, Message, Verbosity, Category, DumpStack, Line, File, Func );
}
#pragma endregion NetSlime
};