- Renomeia ~50 classes UCLASS/USTRUCT/UENUM/UINTERFACE pra Zeus* (AZeusGameMode, AZeusCharacter, UZeusGameInstance, IZeusEntityInterface, UZeusWorldSubsystem, FZeusEntitySnapshot, etc.) - Encurta AZMMOPlayerCharacter -> AZeusCharacter - Renomeia módulos satélite ZMMOAttributes -> ZeusAttributes e ZMMOJobs -> ZeusJobs (pasta + .Build.cs + .uproject) - Mantém módulo principal ZMMO (renomeia depois quando jogo ganhar nome) - DefaultEngine.ini: ActiveClassRedirects ZMMOX -> ZeusX (preserva BPs/assets) - DefaultGame.ini: sections atualizadas pra ZeusThemeSubsystem/ZeusPlayerState - Category="ZMMO|..." -> "Zeus|..." em UPROPERTYs - Preserva LogZMMO, ZMMO_API, /Script/ZMMO., /Game/ZMMO/, classes Target Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
58 lines
2.2 KiB
C++
58 lines
2.2 KiB
C++
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "GameFramework/Actor.h"
|
|
#include "ZeusEntityInterface.h"
|
|
#include "ZeusEntityTypes.h"
|
|
#include "ZeusEntity.generated.h"
|
|
|
|
/**
|
|
* AZeusEntity
|
|
*
|
|
* Classe base para entidades replicadas pelo servidor que NAO precisam de
|
|
* capsula + `UCharacterMovementComponent` — tipicamente NPCs estaticos,
|
|
* objetos dinamicos do mundo, mobs simples sem locomotion fisica.
|
|
*
|
|
* Para personagens com capsula + CMC (proxy de jogador, mobs com locomotion
|
|
* por capsula), use `AZeusPlayerProxy` ou uma futura `AZeusMob` que herde
|
|
* de `ACharacter`.
|
|
*
|
|
* Implementa `IZeusEntityInterface` com:
|
|
* - getters para `EntityId` / `EntityType`;
|
|
* - `ApplyEntitySnapshot` default: `SetActorLocationAndRotation` (sem
|
|
* interpolacao temporal — V1 podera adicionar ring-buffer + lerp);
|
|
* - `SetEntityRelevant(false)` default: oculta + desativa collision +
|
|
* desativa tick (preserva o ator no mundo para futuro pooling).
|
|
*/
|
|
UCLASS(Blueprintable, BlueprintType)
|
|
class ZMMO_API AZeusEntity : public AActor, public IZeusEntityInterface
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
AZeusEntity();
|
|
|
|
// --- IZeusEntityInterface ---
|
|
virtual int64 GetZeusEntityId() const override { return EntityId; }
|
|
virtual EZeusEntityType GetZeusEntityType() const override { return EntityType; }
|
|
virtual void ApplyEntitySnapshot(const FZeusEntitySnapshot& Snapshot) override;
|
|
virtual void SetEntityRelevant(bool bRelevant) override;
|
|
|
|
/** Setter usado pelo `UZeusWorldSubsystem` apos o spawn para registrar a identidade. */
|
|
UFUNCTION(BlueprintCallable, Category = "Zeus|Entity")
|
|
void SetZeusIdentity(int64 InEntityId, EZeusEntityType InEntityType);
|
|
|
|
protected:
|
|
/** Identificador autoritativo do servidor. Atribuido em `SetZeusIdentity`. */
|
|
UPROPERTY(VisibleInstanceOnly, BlueprintReadOnly, Category = "Zeus|Entity")
|
|
int64 EntityId = 0;
|
|
|
|
/** Categoria autoritativa (Player/Mob/NPC/Object). */
|
|
UPROPERTY(VisibleInstanceOnly, BlueprintReadOnly, Category = "Zeus|Entity")
|
|
EZeusEntityType EntityType = EZeusEntityType::Object;
|
|
|
|
/** Estado de relevancia atual (espelha as transicoes Hidden<->Relevant do servidor). */
|
|
UPROPERTY(VisibleInstanceOnly, BlueprintReadOnly, Category = "Zeus|Entity")
|
|
bool bIsZeusRelevant = true;
|
|
};
|