#include "ZeusEntity.h"

AZeusEntity::AZeusEntity()
{
	PrimaryActorTick.bCanEverTick = false;
	bReplicates = false;
}

void AZeusEntity::SetZeusIdentity(const int64 InEntityId, const EZeusEntityType InEntityType)
{
	EntityId = InEntityId;
	EntityType = InEntityType;
}

void AZeusEntity::ApplyEntitySnapshot(const FZeusEntitySnapshot& Snapshot)
{
	const FRotator NewRotation(0.0f, Snapshot.YawDeg, 0.0f);
	SetActorLocationAndRotation(Snapshot.PositionCm, NewRotation);
}

void AZeusEntity::SetEntityRelevant(const bool bRelevant)
{
	if (bIsZeusRelevant == bRelevant)
	{
		return;
	}

	bIsZeusRelevant = bRelevant;
	SetActorHiddenInGame(!bRelevant);
	SetActorEnableCollision(bRelevant);
	SetActorTickEnabled(bRelevant);
}
