Skip to content

Commit

Permalink
fixup merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt-Carey committed May 15, 2024
1 parent 6a840f0 commit 27d8d8d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,6 @@ void InworldPacketTranslator::TranslateEvent<>(const Inworld::ControlEventConver
}
}

template <>
void InworldPacketTranslator::TranslateEvent<>(const Inworld::ControlEventConversationUpdate& Original, FInworldConversationUpdateEvent& New)
{
TranslateInworldPacket(Original, New);
New.EventType = static_cast<EInworldConversationUpdateType>(Original.GetType());
New.bIncludePlayer = Original.GetIncludePlayer();
for (const auto& Agent : Original.GetAgents())
{
New.Agents.Add(UTF8_TO_TCHAR(Agent.c_str()));
}
}

template<>
void InworldPacketTranslator::TranslateEvent<Inworld::EmotionEvent, FInworldEmotionEvent>(const Inworld::EmotionEvent& Original, FInworldEmotionEvent& New)
{
Expand Down
11 changes: 0 additions & 11 deletions InworldAI/Source/InworldAIClient/Private/InworldPackets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,17 +235,6 @@ void FInworldConversationUpdateEvent::AppendDebugString(FString& Str) const
}
}

void FInworldConversationUpdateEvent::AppendDebugString(FString& Str) const
{
AppendToDebugString(Str, TEXT("ConversationUpdate"));
AppendToDebugString(Str, EventType == EInworldConversationUpdateType::STARTED ? TEXT("STARTED") : EventType == EInworldConversationUpdateType::EVICTED ? TEXT("EVICTED") : TEXT("UPDATED"));
AppendToDebugString(Str, bIncludePlayer ? TEXT("IncludePlayer") : TEXT("ExcludePlayer"));
for (const auto& AgentId : Agents)
{
AppendToDebugString(Str, AgentId);
}
}

void FInworldEmotionEvent::AppendDebugString(FString& Str) const
{
AppendToDebugString(Str, TEXT("Emotion"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ void UInworldPlayerTargetingComponent::TickComponent(float DeltaTime, enum ELeve
{
Super::TickComponent(DeltaTime, TickType, ThisTickFunction);

if (InworldPlayer.IsValid())
{
UpdateTargetCharacters();
}
UpdateTargetCharacters();
}

void UInworldPlayerTargetingComponent::UpdateTargetCharacters()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,14 @@ void UInworldSession::OnRep_ConnectionState()
OnConnectionStateChangedDelegate.Broadcast(ConnectionState);
}

void UInworldSession::FInworldSessionPacketVisitor::Visit(const FInworldControlEvent& Event)
{
if (Event.Action == EInworldControlEventAction::WARNING)
{
UE_LOG(LogInworldAIIntegration, Warning, TEXT("%s"), *Event.Description);
}
}

void UInworldSession::FInworldSessionPacketVisitor::Visit(const FInworldConversationUpdateEvent& Event)
{
if (Event.EventType == EInworldConversationUpdateType::EVICTED)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ class INWORLDAIINTEGRATION_API UInworldSession : public UObject
{}
virtual ~FInworldSessionPacketVisitor() = default;

virtual void Visit(const FInworldControlEvent& Event) override;
virtual void Visit(const FInworldConversationUpdateEvent& Event) override;
virtual void Visit(const FInworldLoadCharactersEvent& Event) override;
virtual void Visit(const FInworldChangeSceneEvent& Event) override;
Expand Down

0 comments on commit 27d8d8d

Please sign in to comment.