Compare commits
2 Commits
d5402216a2
...
16de963301
| Author | SHA1 | Date | |
|---|---|---|---|
| 16de963301 | |||
| 8d73cc9df8 |
@@ -71,6 +71,13 @@ ScreenSetAsset=/Game/ZMMO/UI/InGame/DA_InGameScreenSet.DA_InGameScreenSet
|
|||||||
; (UWorldSubsystem) subscribe nos delegates do UZeusNetworkSubsystem.
|
; (UWorldSubsystem) subscribe nos delegates do UZeusNetworkSubsystem.
|
||||||
+ComponentClasses=/Script/ZeusGAS.ZeusGASComponent
|
+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]
|
[/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="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))
|
-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.
@@ -432,6 +432,17 @@ void AZeusCharacter::HandleZeusCharInfo(const int64 InEntityId, const FString& C
|
|||||||
TEXT("AZeusCharacter: S_CHAR_INFO recebido EntityId=%lld name=%s guild=%s"),
|
TEXT("AZeusCharacter: S_CHAR_INFO recebido EntityId=%lld name=%s guild=%s"),
|
||||||
InEntityId, *CharName, *GuildName);
|
InEntityId, *CharName, *GuildName);
|
||||||
|
|
||||||
|
// 2026-06-03 fix: server envia S_CHAR_INFO de TODOS os players (proprio +
|
||||||
|
// catch-up de proxies pre-existentes). Sem este filtro, o nome do ultimo
|
||||||
|
// proxy recebido sobrescrevia o do pawn local (ex: player Mateuus loga e
|
||||||
|
// ve "Olatudook" em si mesmo porque o catch-up do Olatudook chegou depois
|
||||||
|
// do S_CHAR_INFO proprio). Proxies remotos sao roteados pelo registry no
|
||||||
|
// UZeusWorldSubsystem (futuro nameplate por EntityId).
|
||||||
|
if (ZeusEntityId != 0 && InEntityId != ZeusEntityId)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
APlayerState* PS = GetPlayerState();
|
APlayerState* PS = GetPlayerState();
|
||||||
if (!PS)
|
if (!PS)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,10 +2,13 @@
|
|||||||
|
|
||||||
#include "Engine/GameInstance.h"
|
#include "Engine/GameInstance.h"
|
||||||
#include "Engine/World.h"
|
#include "Engine/World.h"
|
||||||
|
#include "GameFramework/GameStateBase.h"
|
||||||
#include "ZMMO.h"
|
#include "ZMMO.h"
|
||||||
#include "ZeusEntity.h"
|
#include "ZeusEntity.h"
|
||||||
#include "ZeusEntityInterface.h"
|
#include "ZeusEntityInterface.h"
|
||||||
|
#include "ZeusGASComponent.h"
|
||||||
#include "ZeusPlayerProxy.h"
|
#include "ZeusPlayerProxy.h"
|
||||||
|
#include "ZeusPlayerState.h"
|
||||||
#include "ZeusNetworkSubsystem.h"
|
#include "ZeusNetworkSubsystem.h"
|
||||||
|
|
||||||
void UZeusWorldSubsystem::Initialize(FSubsystemCollectionBase& Collection)
|
void UZeusWorldSubsystem::Initialize(FSubsystemCollectionBase& Collection)
|
||||||
@@ -160,6 +163,54 @@ void UZeusWorldSubsystem::HandlePlayerSpawned(const int64 EntityId, const bool b
|
|||||||
AsEntity->SetEntityRelevant(true);
|
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));
|
RemoteEntities.Add(EntityId, TWeakObjectPtr<AActor>(SpawnedActor));
|
||||||
UE_LOG(LogZMMO, Log, TEXT("ZeusWorldSubsystem: spawned remote EntityId=%d at (%s) yaw=%.1f t=%lld"),
|
UE_LOG(LogZMMO, Log, TEXT("ZeusWorldSubsystem: spawned remote EntityId=%d at (%s) yaw=%.1f t=%lld"),
|
||||||
EntityId, *PosCm.ToString(), YawDeg, ServerTimeMs);
|
EntityId, *PosCm.ToString(), YawDeg, ServerTimeMs);
|
||||||
@@ -185,6 +236,22 @@ void UZeusWorldSubsystem::HandlePlayerDespawned(const int64 EntityId)
|
|||||||
{
|
{
|
||||||
AsEntity->SetEntityRelevant(false);
|
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();
|
Actor->Destroy();
|
||||||
}
|
}
|
||||||
RemoteEntities.Remove(EntityId);
|
RemoteEntities.Remove(EntityId);
|
||||||
|
|||||||
Reference in New Issue
Block a user