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:
@ -9,7 +9,10 @@
|
||||
|
||||
#include "AbilitySystem/GasaAbilitySystemComponent.h"
|
||||
#include "AbilitySystem/GasaAttributeSet.h"
|
||||
#include "Components/SkeletalMeshComponent.h"
|
||||
#include "Engine/PostProcessVolume.h"
|
||||
#include "Game/GasaLevelScriptActor.h"
|
||||
#include "Materials/MaterialInstanceDynamic.h"
|
||||
|
||||
void AGasaCharacter::SetHighlight(EHighlight Desired)
|
||||
{
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
#include "GasaCommon.h"
|
||||
#include "Game/GasaPlayerState.h"
|
||||
#include "Networking/GasaNetLibrary.h"
|
||||
|
||||
#include "GasaCharacter.generated.h"
|
||||
|
||||
@ -59,6 +60,28 @@ public:
|
||||
AGasaCharacter();
|
||||
|
||||
FORCEINLINE AGasaPlayerState* GetGasaPlayerState() { return GetPlayerState<AGasaPlayerState>(); }
|
||||
|
||||
#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
|
||||
|
||||
#pragma region IAbilitySystem
|
||||
FORCEINLINE UAttributeSet* GetAttributes() { return Attributes; }
|
||||
|
@ -25,10 +25,13 @@ void APlayerCharacter::PossessedBy(AController* NewController)
|
||||
AbilitySystem->InitAbilityActorInfo(PS, this);
|
||||
}
|
||||
|
||||
AGasaPlayerController* PC = GetController<AGasaPlayerController>();
|
||||
AGasaHUD* HUD = PC->GetHUD<AGasaHUD>();
|
||||
FWidgetControllerData Data = { PC, PS, AbilitySystem, Attributes };
|
||||
HUD->InitHostWidget(& Data);
|
||||
if (IsLocallyControlled())
|
||||
{
|
||||
AGasaPlayerController* PC = GetController<AGasaPlayerController>();
|
||||
AGasaHUD* HUD = PC->GetHUD<AGasaHUD>();
|
||||
FWidgetControllerData Data = { PC, PS, AbilitySystem, Attributes };
|
||||
HUD->InitHostWidget(& Data);
|
||||
}
|
||||
}
|
||||
|
||||
// TODO(Ed): We need to setup Net Slime...
|
||||
|
Reference in New Issue
Block a user