feat(gas): SM6 client EntityId u64 + M8 cue assets + UI/data tweaks (sessao 1+2)
This commit is contained in:
@@ -71,6 +71,13 @@ ScreenSetAsset=/Game/ZMMO/UI/InGame/DA_InGameScreenSet.DA_InGameScreenSet
|
||||
; (UWorldSubsystem) subscribe nos delegates do UZeusNetworkSubsystem.
|
||||
+ComponentClasses=/Script/ZeusGAS.ZeusGASComponent
|
||||
|
||||
; === GAS Cue paths (Batch 2.5 — S_ABILITY_CUE multicast cosmetico) ===
|
||||
; UGameplayCueManager scaneia esses paths no boot pra mapear FGameplayTag
|
||||
; -> AGameplayCueNotify_Actor BP. UZeusGASComponent::DispatchAbilityCue chama
|
||||
; ASC->ExecuteGameplayCueLocal(CueTag, params) -> manager resolve pelo path.
|
||||
[/Script/GameplayAbilities.AbilitySystemGlobals]
|
||||
+GameplayCueNotifyPaths="/Game/ZMMO/GAS/Cues"
|
||||
|
||||
[/Script/Engine.AssetManagerSettings]
|
||||
-PrimaryAssetTypesToScan=(PrimaryAssetType="Map",AssetBaseClass=/Script/Engine.World,bHasBlueprintClasses=False,bIsEditorOnly=True,Directories=((Path="/Game/Maps")),SpecificAssets=,Rules=(Priority=-1,ChunkId=-1,bApplyRecursively=True,CookRule=Unknown))
|
||||
-PrimaryAssetTypesToScan=(PrimaryAssetType="PrimaryAssetLabel",AssetBaseClass=/Script/Engine.PrimaryAssetLabel,bHasBlueprintClasses=False,bIsEditorOnly=True,Directories=((Path="/Game")),SpecificAssets=,Rules=(Priority=-1,ChunkId=-1,bApplyRecursively=True,CookRule=Unknown))
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Content/ZMMO/Core/Player/BP_PlayerState.uasset
Normal file
BIN
Content/ZMMO/Core/Player/BP_PlayerState.uasset
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Content/ZMMO/GAS/Cues/GC_Dash.uasset
Normal file
BIN
Content/ZMMO/GAS/Cues/GC_Dash.uasset
Normal file
Binary file not shown.
BIN
Content/ZMMO/Sounds/Abilities/SA_Dash.uasset
Normal file
BIN
Content/ZMMO/Sounds/Abilities/SA_Dash.uasset
Normal file
Binary file not shown.
BIN
Content/ZMMO/Sounds/Abilities/SC_Dash.uasset
Normal file
BIN
Content/ZMMO/Sounds/Abilities/SC_Dash.uasset
Normal file
Binary file not shown.
BIN
Content/ZMMO/Sounds/Abilities/SW_Dash_Source.uasset
Normal file
BIN
Content/ZMMO/Sounds/Abilities/SW_Dash_Source.uasset
Normal file
Binary file not shown.
BIN
Content/ZMMO/Sounds/Abilities/SW_Dash_Source.wav
Normal file
BIN
Content/ZMMO/Sounds/Abilities/SW_Dash_Source.wav
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Content/ZMMO/VFX/Abilities/Dash/NS_Dash_Burst.uasset
Normal file
BIN
Content/ZMMO/VFX/Abilities/Dash/NS_Dash_Burst.uasset
Normal file
Binary file not shown.
BIN
Content/ZMMO/VFX/Abilities/Dash/T_DashShard_Source.png
Normal file
BIN
Content/ZMMO/VFX/Abilities/Dash/T_DashShard_Source.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.8 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -2,10 +2,13 @@
|
||||
|
||||
#include "Engine/GameInstance.h"
|
||||
#include "Engine/World.h"
|
||||
#include "GameFramework/GameStateBase.h"
|
||||
#include "ZMMO.h"
|
||||
#include "ZeusEntity.h"
|
||||
#include "ZeusEntityInterface.h"
|
||||
#include "ZeusGASComponent.h"
|
||||
#include "ZeusPlayerProxy.h"
|
||||
#include "ZeusPlayerState.h"
|
||||
#include "ZeusNetworkSubsystem.h"
|
||||
|
||||
void UZeusWorldSubsystem::Initialize(FSubsystemCollectionBase& Collection)
|
||||
@@ -160,6 +163,54 @@ void UZeusWorldSubsystem::HandlePlayerSpawned(const int64 EntityId, const bool b
|
||||
AsEntity->SetEntityRelevant(true);
|
||||
}
|
||||
|
||||
// === PlayerState pra proxies (Batch 2.5+) ===
|
||||
//
|
||||
// Sem PlayerState, o proxy fica fora do GameState->PlayerArray. Daqui pra
|
||||
// cima, qualquer sistema que itera PlayerArray (UZeusGASNetworkHandler::
|
||||
// FindGASComponentForEntity, HUD, chat, friend list) NAO consegue achar o
|
||||
// proxy -> fallback ao local player -> efeito apareceria no char errado
|
||||
// (bug do cue do Dash). Criar PS replicado-fake permite que o pipeline GAS
|
||||
// trate proxies igual a local players.
|
||||
//
|
||||
// PlayerState tem o UZeusGASComponent via DefaultGame.ini Component Registry,
|
||||
// entao GASComp e' auto-instanciado. So' precisamos seed o EntityId.
|
||||
if (APawn* ProxyPawn = Cast<APawn>(SpawnedActor))
|
||||
{
|
||||
FActorSpawnParameters PSParams;
|
||||
PSParams.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AlwaysSpawn;
|
||||
PSParams.Owner = ProxyPawn;
|
||||
AZeusPlayerState* ProxyPS = World->SpawnActor<AZeusPlayerState>(
|
||||
AZeusPlayerState::StaticClass(), FVector::ZeroVector, FRotator::ZeroRotator, PSParams);
|
||||
if (ProxyPS)
|
||||
{
|
||||
ProxyPawn->SetPlayerState(ProxyPS); // tambem chama ProxyPS->SetPawn(ProxyPawn)
|
||||
|
||||
// Add ao PlayerArray do GameState (replicacao UE faria isso automatico,
|
||||
// mas no nosso pipeline custom o PS local-fake precisa ser inserido).
|
||||
if (AGameStateBase* GS = World->GetGameState())
|
||||
{
|
||||
GS->AddPlayerState(ProxyPS);
|
||||
}
|
||||
|
||||
// Seed EntityId no GASComp do PS (criado via Component Registry).
|
||||
// FindGASComponentForEntity vai resolver via PS->FindComponentByClass.
|
||||
if (UZeusGASComponent* GASComp = ProxyPS->FindComponentByClass<UZeusGASComponent>())
|
||||
{
|
||||
GASComp->SeedEntityId(EntityId);
|
||||
}
|
||||
|
||||
UE_LOG(LogZMMO, Log,
|
||||
TEXT("ZeusWorldSubsystem: PlayerState criado p/ proxy EntityId=%lld PS=%s"),
|
||||
EntityId, *ProxyPS->GetName());
|
||||
}
|
||||
else
|
||||
{
|
||||
UE_LOG(LogZMMO, Warning,
|
||||
TEXT("ZeusWorldSubsystem: SpawnActor<AZeusPlayerState> falhou pra proxy EntityId=%lld"),
|
||||
EntityId);
|
||||
}
|
||||
}
|
||||
|
||||
RemoteEntities.Add(EntityId, TWeakObjectPtr<AActor>(SpawnedActor));
|
||||
UE_LOG(LogZMMO, Log, TEXT("ZeusWorldSubsystem: spawned remote EntityId=%d at (%s) yaw=%.1f t=%lld"),
|
||||
EntityId, *PosCm.ToString(), YawDeg, ServerTimeMs);
|
||||
@@ -185,6 +236,22 @@ void UZeusWorldSubsystem::HandlePlayerDespawned(const int64 EntityId)
|
||||
{
|
||||
AsEntity->SetEntityRelevant(false);
|
||||
}
|
||||
// Destrui PS proxy linkado (Batch 2.5+). Sem isso o GameState->PlayerArray
|
||||
// fica com PS orfa apos o proxy ser destruido.
|
||||
if (APawn* Pawn = Cast<APawn>(Actor))
|
||||
{
|
||||
if (APlayerState* PS = Pawn->GetPlayerState())
|
||||
{
|
||||
if (UWorld* World = GetWorld())
|
||||
{
|
||||
if (AGameStateBase* GS = World->GetGameState())
|
||||
{
|
||||
GS->RemovePlayerState(PS);
|
||||
}
|
||||
}
|
||||
PS->Destroy();
|
||||
}
|
||||
}
|
||||
Actor->Destroy();
|
||||
}
|
||||
RemoteEntities.Remove(EntityId);
|
||||
|
||||
Reference in New Issue
Block a user